mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +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
Notes:
sideshowbarker
2024-07-17 05:13:53 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/be9fcaf92d Pull-request: https://github.com/SerenityOS/serenity/pull/19615
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
|
||||
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.
|
||||
|
||||
|
|
|
@ -57,6 +57,9 @@ public:
|
|||
|
||||
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:
|
||||
static Optional<URL> parse_data_url(StringView raw_input);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue