LibURL+LibWeb: Ensure opaque paths always roundtrip

Corresponds to: 6c782003
This commit is contained in:
Shannon Booth 2025-03-15 15:38:09 +13:00 committed by Sam Atkins
commit ec3c545426
Notes: github-actions[bot] 2025-03-18 12:18:21 +00:00
17 changed files with 280 additions and 99 deletions

View file

@ -1,6 +1,6 @@
/*
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
* Copyright (c) 2023-2024, Shannon Booth <shannon@serenityos.org>
* Copyright (c) 2023-2025, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -229,10 +229,6 @@ void URLSearchParams::update()
// 4. Set querys URL objects URLs query to serializedQuery.
m_url->set_query({}, serialized_query);
// 5. If serializedQuery is null, then potentially strip trailing spaces from an opaque path with querys URL object.
if (!serialized_query.has_value())
strip_trailing_spaces_from_an_opaque_path(*m_url);
}
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete