1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00
serenity/Userland/Libraries/LibWeb/URL
MacDue 8283e8b88c AK: Don't store parts of URLs percent decoded
As noted in serval comments doing this goes against the WC3 spec,
and breaks parsing then re-serializing URLs that contain percent
encoded data, that was not encoded using the same character set as
the serializer.

For example, previously if you had a URL like:

https:://foo.com/what%2F%2F (the path is what + '//' percent encoded)

Creating URL("https:://foo.com/what%2F%2F").serialize() would return:

https://foo.com/what//

Which is incorrect and not the same as the URL we passed. This is
because the re-serializing uses the PercentEncodeSet::Path which
does not include '/'.

Only doing the percent encoding in the setters fixes this, which
is required to navigate to Google Street View (which includes a
percent encoded URL in its URL).

Seems to fix #13477 too
2023-04-12 07:40:22 +02:00
..
URL.cpp LibWeb: Implement URL.canParse(url, base) 2023-04-11 16:28:20 +02:00
URL.h AK: Don't store parts of URLs percent decoded 2023-04-12 07:40:22 +02:00
URL.idl LibWeb: Implement URL.canParse(url, base) 2023-04-11 16:28:20 +02:00
URLSearchParams.cpp LibWeb/WebIDL: Store SimpleException message as a String{,View} variant 2023-03-03 19:50:36 +00:00
URLSearchParams.h LibWeb: Port URL and URLSearchParams to new String 2023-03-01 22:44:20 +00:00
URLSearchParams.idl LibWeb: Port URL and URLSearchParams to new String 2023-03-01 22:44:20 +00:00
URLSearchParamsIterator.cpp LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00
URLSearchParamsIterator.h LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr 2023-03-15 08:48:49 +01:00