mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibURL: Publicly expose ability to parse a host
This is used by the HTML specification.
This commit is contained in:
parent
c5eca713e9
commit
1f4bbc2bfb
|
|
@ -551,7 +551,7 @@ static ErrorOr<String> domain_to_ascii(StringView domain, bool be_strict)
|
|||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#concept-host-parser
|
||||
static Optional<Host> parse_host(StringView input, bool is_opaque = false)
|
||||
Optional<Host> Parser::parse_host(StringView input, bool is_opaque)
|
||||
{
|
||||
// 1. If input starts with U+005B ([), then:
|
||||
if (input.starts_with('[')) {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,8 @@ public:
|
|||
|
||||
// https://url.spec.whatwg.org/#shorten-a-urls-path
|
||||
static void shorten_urls_path(URL&);
|
||||
|
||||
static Optional<Host> parse_host(StringView input, bool is_opaque = false);
|
||||
};
|
||||
|
||||
#undef ENUMERATE_STATES
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user