1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:57:47 +00:00

AK: Implement URL::serialize_path() to spec

This commit also reverts db5ad0c since code outside of the web spec
expects serialized paths to be percent decoded.

Also, there are issues trying to implement the concept "opaque
path". For now, we still use the old cannot_be_a_base_url(), but its
usage needs to be removed in favor of a has_opaque_path() as the spec
has changed since then.
This commit is contained in:
Kemal Zebari 2023-09-12 08:50:15 -07:00 committed by Andrew Kaster
parent a2810d3cf8
commit b6b4e59bf7
2 changed files with 20 additions and 7 deletions

View file

@ -107,7 +107,11 @@ public:
m_paths.append("");
}
DeprecatedString serialize_path() const;
enum class ApplyPercentDecoding {
Yes,
No
};
DeprecatedString serialize_path(ApplyPercentDecoding = ApplyPercentDecoding::Yes) const;
DeprecatedString serialize(ExcludeFragment = ExcludeFragment::No) const;
DeprecatedString serialize_for_display() const;
DeprecatedString to_deprecated_string() const { return serialize(); }