mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Strip trailing spaces from opaque URL path on query change
This was added in fdaa0e5a
to fix a case where roundtrips could fail. We had already partially
implemented these steps - but it seems this was missed in the update of
URLSearchParams.
Fixes the last failing WPT test for:
https://wpt.live/url/urlsearchparams-delete.any.html
This commit is contained in:
parent
1c5a7cd31b
commit
cff3e78a14
Notes:
github-actions[bot]
2024-08-17 05:45:33 +00:00
Author: https://github.com/shannonbooth
Commit: cff3e78a14
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1081
3 changed files with 26 additions and 0 deletions
|
@ -229,6 +229,10 @@ void URLSearchParams::update()
|
|||
|
||||
// 4. Set query’s URL object’s URL’s query to serializedQuery.
|
||||
m_url->set_query({}, move(serialized_query));
|
||||
|
||||
// 5. If serializedQuery is null, then potentially strip trailing spaces from an opaque path with query’s URL object.
|
||||
if (!serialized_query.has_value())
|
||||
strip_trailing_spaces_from_an_opaque_path(*m_url);
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue