Explorar o código

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.
Kemal Zebari hai 1 ano
pai
achega
ce549eb92a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Userland/Libraries/LibWeb/URL/URL.cpp

+ 1 - 1
Userland/Libraries/LibWeb/URL/URL.cpp

@@ -353,7 +353,7 @@ WebIDL::ExceptionOr<String> URL::pathname() const
     auto& vm = realm().vm();
     auto& vm = realm().vm();
 
 
     // The pathname getter steps are to return the result of URL path serializing this’s URL.
     // 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
 // https://url.spec.whatwg.org/#ref-for-dom-url-pathname%E2%91%A0