LibWeb: Use text encoding from DOM when parsing URLs

This passes the DOM encoding down to the URL parser, so the correct
encoder can be used.
This commit is contained in:
BenJilks 2024-08-05 21:47:45 +01:00 committed by Tim Ledbetter
commit c1958437f9
Notes: github-actions[bot] 2024-08-08 16:51:10 +00:00
5 changed files with 11 additions and 8 deletions

View file

@ -1034,7 +1034,7 @@ URL::URL Document::parse_url(StringView url) const
auto base_url = this->base_url();
// 2. Return the result of applying the URL parser to url, with baseURL.
return DOMURL::parse(url, base_url);
return DOMURL::parse(url, base_url, Optional<StringView> { m_encoding });
}
void Document::set_needs_layout()