From ab709bbe447299faf73b455d335d4092d1520854 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 8 Nov 2023 12:11:05 -0500 Subject: [PATCH] Fix search setting for non-special urls with space, query and fragment --- url/src/lib.rs | 4 +++- url/tests/expected_failures.txt | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/url/src/lib.rs b/url/src/lib.rs index 6879d9f63..febdb3609 100644 --- a/url/src/lib.rs +++ b/url/src/lib.rs @@ -1566,7 +1566,9 @@ impl Url { }); } else { self.query_start = None; - self.strip_trailing_spaces_from_opaque_path(); + if fragment.is_none() { + self.strip_trailing_spaces_from_opaque_path(); + } } self.restore_already_parsed_fragment(fragment); diff --git a/url/tests/expected_failures.txt b/url/tests/expected_failures.txt index 1c404a8b7..168a8327f 100644 --- a/url/tests/expected_failures.txt +++ b/url/tests/expected_failures.txt @@ -42,12 +42,10 @@ set pathname to <> set port to set href to - set search to <> - set search to <> set pathname to <\\\\> set pathname to set pathname to set pathname to set pathname to set pathname to - set pathname to

\ No newline at end of file + set pathname to