1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:54:58 +00:00

AK+LibWeb: Do not percent encode/decode in URL fragment setter/getters

The web specs do not expect decoding or decoding to happen when calling
these helpers. This allows us to remove the raw_fragment helper function
from the URL class.
This commit is contained in:
Shannon Booth 2023-08-12 19:34:25 +12:00 committed by Andrew Kaster
parent c25485700a
commit 5663a2d3b4
3 changed files with 3 additions and 11 deletions

View file

@ -63,11 +63,6 @@ DeprecatedString URL::basename() const
}
DeprecatedString URL::fragment() const
{
return percent_decode(m_fragment);
}
DeprecatedString URL::raw_fragment() const
{
return m_fragment;
}
@ -142,7 +137,7 @@ void URL::append_path(StringView path)
void URL::set_fragment(StringView fragment)
{
m_fragment = deprecated_string_percent_encode(fragment, PercentEncodeSet::Fragment);
m_fragment = fragment;
}
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port