LibURL+LibWeb: Do not percent decode in password/username getters

Doing it is not part of the spec. Whenever needed, the spec will
explicitly percent decode the username and password.

This fixes some URL WPT tests.
This commit is contained in:
Shannon Booth 2024-08-04 22:02:02 +12:00 committed by Tim Ledbetter
commit f511c0b441
Notes: github-actions[bot] 2024-08-04 11:59:57 +00:00
14 changed files with 62 additions and 45 deletions

View file

@ -135,8 +135,8 @@ bool can_have_its_url_rewritten(DOM::Document const& document, URL::URL const& t
// 2. If targetURL and documentURL differ in their scheme, username, password, host, or port components,
// then return false.
if (target_url.scheme() != document_url.scheme()
|| target_url.raw_username() != document_url.raw_username()
|| target_url.raw_password() != document_url.raw_password()
|| target_url.username() != document_url.username()
|| target_url.password() != document_url.password()
|| target_url.host() != document_url.host()
|| target_url.port() != document_url.port())
return false;