From ce549eb92a8dfe44a6839f1007999b47179689e4 Mon Sep 17 00:00:00 2001 From: Kemal Zebari Date: Tue, 12 Sep 2023 10:38:14 -0700 Subject: [PATCH] LibWeb/URL: Don't have `URL::pathname()` perform percent decode Since the spec expects us to use AK::URL::serialize_path() without doing any percent decoding. --- Userland/Libraries/LibWeb/URL/URL.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/URL/URL.cpp b/Userland/Libraries/LibWeb/URL/URL.cpp index 28dde4d2eb..f4961ae02d 100644 --- a/Userland/Libraries/LibWeb/URL/URL.cpp +++ b/Userland/Libraries/LibWeb/URL/URL.cpp @@ -353,7 +353,7 @@ WebIDL::ExceptionOr URL::pathname() const auto& vm = realm().vm(); // The pathname getter steps are to return the result of URL path serializing this’s URL. - return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_url.serialize_path())); + return TRY_OR_THROW_OOM(vm, String::from_deprecated_string(m_url.serialize_path(AK::URL::ApplyPercentDecoding::No))); } // https://url.spec.whatwg.org/#ref-for-dom-url-pathname%E2%91%A0