mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:57:35 +00:00
AK+Everywhere: Replace usages of URLParser::urlencode() and urldecode()
This replaces all occurrences of those functions with the newly implemented functions URL::percent_encode() and URL::percent_decode(). The old functions will be removed in a further commit.
This commit is contained in:
parent
2a6c9bc5f7
commit
a603e69599
5 changed files with 9 additions and 11 deletions
|
@ -8,7 +8,6 @@
|
|||
#include <AK/LexicalPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/URL.h>
|
||||
#include <AK/URLParser.h>
|
||||
#include <AK/Utf8View.h>
|
||||
|
||||
namespace AK {
|
||||
|
@ -237,7 +236,7 @@ bool URL::parse(const StringView& string)
|
|||
if (state == State::InFragment)
|
||||
m_fragment = String::copy(buffer);
|
||||
if (state == State::InDataPayload)
|
||||
m_data_payload = urldecode(String::copy(buffer));
|
||||
m_data_payload = URL::percent_decode(String::copy(buffer));
|
||||
if (state == State::InPort) {
|
||||
auto port_opt = String::copy(buffer).to_uint();
|
||||
if (port_opt.has_value())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue