mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 19:47:17 +02:00
AK: Port URL username/password from DeprecatedString to String
And for cases that just need to check whether the password/username is
empty, add a raw_{password,username} helper to avoid any allocation.
This commit is contained in:
committed by
Andrew Kaster
parent
6b29dc3e46
commit
55a01e72ca
Notes:
sideshowbarker
2024-07-17 11:33:34 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/55a01e72ca Pull-request: https://github.com/SerenityOS/serenity/pull/20510 Reviewed-by: https://github.com/ADKaster ✅
@@ -175,10 +175,10 @@ Optional<AK::URL> strip_url_for_use_as_referrer(Optional<AK::URL> url, OriginOnl
|
||||
return {};
|
||||
|
||||
// 3. Set url’s username to the empty string.
|
||||
url->set_username(""sv);
|
||||
MUST(url->set_username(""sv));
|
||||
|
||||
// 4. Set url’s password to the empty string.
|
||||
url->set_password(""sv);
|
||||
MUST(url->set_password(""sv));
|
||||
|
||||
// 5. Set url’s fragment to null.
|
||||
url->set_fragment({});
|
||||
|
||||
Reference in New Issue
Block a user