ladybird/Userland/Utilities
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
..
abench.cpp LibCore+Utilities: Replace ElapsedTimer precise flag with an enum 2024-02-26 16:12:20 -07:00
aconv.cpp aconv: Override encoder in output metadata 2023-08-29 10:43:34 +02:00
animation.cpp LibGfx/GIF: Write the netscape extension block 2024-05-22 13:29:05 -04:00
gzip.cpp Utilities: Merge the gunzip utility with gzip 2024-05-14 12:35:25 -06:00
headless-browser.cpp LibURL+Everywhere: Only percent decode URL paths when actually needed 2024-08-05 09:58:13 +02:00
icc.cpp LibGfx+icc: Prefix AK::FixedPoint with AK Namespace 2024-07-18 09:43:38 +01:00
image.cpp LibGfx: Remove support for the various "portable" image formats 2024-06-17 21:57:35 +02:00
js.cpp Utilities/js: Make it possible to exit via two consecutive ^C's 2024-07-27 11:49:45 +01:00
lzcat.cpp AK: Add the Input word to input-only buffered streams 2023-05-09 11:18:46 +02:00
tar.cpp Utilities/tar: Open archive file before changing directory 2024-06-01 18:35:31 +02:00
ttfdisasm.cpp Everywhere: Rename Gfx::OpenType::Font to Gfx::OpenType::Typeface 2024-07-13 09:31:02 +02:00
wasm.cpp LibWasm: Clean up module sections API 2024-08-01 11:44:07 +02:00
xml.cpp LibURL+Everywhere: Only percent decode URL paths when actually needed 2024-08-05 09:58:13 +02:00
xzcat.cpp AK: Add the Input word to input-only buffered streams 2023-05-09 11:18:46 +02:00