ladybird/Userland/Libraries/LibWeb/DOMURL
Shannon Booth cc55732332 LibURL+Everywhere: Only percent decode URL paths when actually needed
Web specs do not return through javascript percent decoded URL path
components - but we were doing this in a number of places due to the
default behaviour of URL::serialize_path.

Since percent encoded URL paths may not contain valid UTF-8 - this was
resulting in us crashing in these places.

For example - on an HTMLAnchorElement when retrieving the pathname for
the URL of:

http://ladybird.org/foo%C2%91%91

To fix this make the URL class only return the percent encoded
serialized path, matching the URL spec. When the decoded path is
required instead explicitly call URL::percent_decode.

This fixes a crash running WPT URL tests for the anchor element on:

https://wpt.live/url/a-element.html
2024-08-05 09:58:13 +02:00
..
DOMURL.cpp LibURL+Everywhere: Only percent decode URL paths when actually needed 2024-08-05 09:58:13 +02:00
DOMURL.h LibURL+Everywhere: Only percent decode URL paths when actually needed 2024-08-05 09:58:13 +02:00
DOMURL.idl LibWeb: Implement URL.parse 2024-05-13 09:21:12 +02:00
URLSearchParams.cpp LibWeb: Remove Bindings/Forward.h from LibWeb/Forward.h 2024-04-27 18:29:35 -04:00
URLSearchParams.h AK+LibURL: Move AK::URL into a new URL library 2024-03-18 14:06:28 -04:00
URLSearchParams.idl
URLSearchParamsIterator.cpp LibWeb: Avoid FlyString lookups when setting IDL interface prototypes 2024-03-16 16:35:54 +01:00
URLSearchParamsIterator.h