mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47: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
|
@ -12,6 +12,7 @@
|
|||
#include "ConsoleWidget.h"
|
||||
#include "DownloadWidget.h"
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/URL.h>
|
||||
#include <Applications/Browser/TabGML.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -39,7 +40,7 @@ URL url_from_user_input(const String& input)
|
|||
{
|
||||
if (input.starts_with("?") && !g_search_engine.is_null()) {
|
||||
auto url = g_search_engine;
|
||||
url.replace("{}", urlencode(input.substring(1)));
|
||||
url.replace("{}", URL::percent_encode(input.substring_view(1)));
|
||||
return URL(url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue