mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
Ladybird/Qt: Sanitize user-provided URLs with LibWebView
This commit is contained in:
parent
191e20d639
commit
f023e37de7
8 changed files with 26 additions and 50 deletions
|
@ -121,12 +121,6 @@ ErrorOr<void> AutoComplete::got_network_response(QNetworkReply* reply)
|
|||
return Error::from_string_view("Invalid engine name"sv);
|
||||
}
|
||||
|
||||
ErrorOr<String> AutoComplete::search_url_from_query(StringView query)
|
||||
{
|
||||
auto search_engine = TRY(ak_string_from_qstring(Settings::the()->search_engine().url));
|
||||
return search_engine.replace("{}"sv, AK::URL::percent_encode(query), ReplaceMode::FirstOnly);
|
||||
}
|
||||
|
||||
ErrorOr<String> AutoComplete::auto_complete_url_from_query(StringView query)
|
||||
{
|
||||
auto autocomplete_engine = TRY(ak_string_from_qstring(Settings::the()->autocomplete_engine().url));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue