diff --git a/url/src/lib.rs b/url/src/lib.rs index 6879d9f63..1435a016e 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 == 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