mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:17:35 +00:00
AK+LibUnicode: Add Unicode::create_unicode_url
This is a workaround for the fact that AK::URLParser can't call into LibUnicode directly.
This commit is contained in:
parent
5bcb019106
commit
58f08107b0
4 changed files with 76 additions and 1 deletions
|
@ -603,7 +603,8 @@ static Optional<URL::Host> parse_host(StringView input, bool is_opaque = false)
|
|||
// FIXME: 4. Let domain be the result of running UTF-8 decode without BOM on the percent-decoding of input.
|
||||
auto domain = URL::percent_decode(input);
|
||||
|
||||
// FIXME: 5. Let asciiDomain be the result of running domain to ASCII on domain.
|
||||
// NOTE: This is handled in Unicode::create_unicode_url, to work around the fact that we can't call into LibUnicode here
|
||||
// FIXME: 5. Let asciiDomain be the result of running domain to ASCII with domain and false.
|
||||
// FIXME: 6. If asciiDomain is failure, then return failure.
|
||||
auto ascii_domain_or_error = String::from_deprecated_string(domain);
|
||||
if (ascii_domain_or_error.is_error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue