1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:17:35 +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

@ -83,9 +83,7 @@ public:
ErrorOr<String> serialized_host() const;
DeprecatedString basename() const;
Optional<String> const& query() const { return m_query; }
// NOTE: fragment() is percent-decoded, raw_fragment() is not.
DeprecatedString fragment() const;
DeprecatedString raw_fragment() const;
Optional<u16> port() const { return m_port; }
DeprecatedString path_segment_at_index(size_t index) const;
size_t path_segment_count() const { return m_paths.size(); }