LibURL+LibWeb: Ensure opaque paths always roundtrip

Corresponds to: https://github.com/whatwg/url/commit/6c782003
This commit is contained in:
Shannon Booth
2025-03-15 15:38:09 +13:00
committed by Sam Atkins
parent 01d1a9528b
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

@@ -2,7 +2,7 @@
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
* Copyright (c) 2021, the SerenityOS developers.
* Copyright (c) 2023, networkException <networkexception@serenityos.org>
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
* Copyright (c) 2024-2025, Shannon Booth <shannon@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@@ -92,9 +92,6 @@ private:
GC::Ref<URLSearchParams> m_query;
};
// https://url.spec.whatwg.org/#potentially-strip-trailing-spaces-from-an-opaque-path
void strip_trailing_spaces_from_an_opaque_path(DOMURL& url);
// https://url.spec.whatwg.org/#concept-url-parser
Optional<URL::URL> parse(StringView input, Optional<URL::URL const&> base_url = {}, Optional<StringView> encoding = {});