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

AK: Implement 'concept-host-serializer' in URL spec

This implementation will allow us to fix serialization of IPv6
addresses not being surrounded by '[' and ']'.

Nothing is calling this function yet - this will come in the next
(larger) commit where the underlying host representation inside of
AK::URL is changed from DeprecatedString to URL::Host.
This commit is contained in:
Shannon Booth 2023-07-26 21:05:35 +12:00 committed by Andreas Kling
parent 803ca8cc80
commit 768f070b86
2 changed files with 23 additions and 0 deletions

View file

@ -61,6 +61,9 @@ public:
// https://url.spec.whatwg.org/#string-percent-encode-after-encoding
static DeprecatedString percent_encode_after_encoding(StringView input, URL::PercentEncodeSet percent_encode_set, bool space_as_plus = false);
// https://url.spec.whatwg.org/#concept-host-serializer
static ErrorOr<String> serialize_host(URL::Host const&);
private:
static Optional<URL> parse_data_url(StringView raw_input);
};