mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
AK: Expose URLParser::percent_encode_after_encoding
This function is useful in places outside of the URLParser in LibWeb.
This commit is contained in:
parent
c445bd3a0c
commit
be9fcaf92d
2 changed files with 4 additions and 1 deletions
|
@ -117,7 +117,7 @@ constexpr bool is_double_dot_path_segment(StringView input)
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://url.spec.whatwg.org/#string-percent-encode-after-encoding
|
// 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)
|
DeprecatedString URLParser::percent_encode_after_encoding(StringView input, URL::PercentEncodeSet percent_encode_set, bool space_as_plus)
|
||||||
{
|
{
|
||||||
// NOTE: This is written somewhat ad-hoc since we don't yet implement the Encoding spec.
|
// NOTE: This is written somewhat ad-hoc since we don't yet implement the Encoding spec.
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,9 @@ public:
|
||||||
|
|
||||||
static URL parse(StringView input, Optional<URL> const& base_url = {}, Optional<URL> url = {}, Optional<State> state_override = {});
|
static URL parse(StringView input, Optional<URL> const& base_url = {}, Optional<URL> url = {}, Optional<State> state_override = {});
|
||||||
|
|
||||||
|
// 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);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Optional<URL> parse_data_url(StringView raw_input);
|
static Optional<URL> parse_data_url(StringView raw_input);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue