mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +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
4
AK/URL.h
4
AK/URL.h
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include <AK/String.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <AK/URLParser.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -62,8 +61,7 @@ public:
|
|||
String to_string() const;
|
||||
String to_string_encoded() const
|
||||
{
|
||||
// Exclusion character set is the same JS's encodeURI() uses
|
||||
return urlencode(to_string(), "#$&+,/:;=?@");
|
||||
return percent_encode(to_string(), PercentEncodeSet::EncodeURI);
|
||||
}
|
||||
|
||||
URL complete_url(const String&) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue