Closed
Bug 1375916
Opened 9 years ago
Closed 8 years ago
URL hash converts spaces to %20
Categories
(Core :: Networking, defect, P5)
Tracking
()
RESOLVED
INVALID
People
(Reporter: rbyers, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [necko-next][necko-triaged])
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3135.4 Safari/537.36
Steps to reproduce:
Read the 'hash' of a URL with a space in it, eg: <a href="#foo bar">
https://jsbin.com/zihepoq
Actual results:
The 'hash' is returned as "#foo%20bar"
Expected results:
Chrome, Safari and Edge all return "#foo bar", as required by the spec at https://url.spec.whatwg.org/#fragment-state (there's a validation error, but that's irrelevant - parsing continues).
See https://w3c-test.org/url/a-element.html "lolscheme:x x#x x" test case. It fails on Firefox with: assert_equals: href expected "lolscheme:x x#x x" but got "lolscheme:x%20x#x%20x"
The Google Search team said this was causing pain for them - meant they needed a special code path to handle Firefox's unique behavior here.
| Reporter | ||
Comment 1•9 years ago
|
||
Note that some related behavior was discussed in bug 1184589 and bz said:
> Per spec, such as it is, at https://url.spec.whatwg.org/#fragment-state the behavior is ... well, it depends.
> It basically preserves whatever was passed in, afaict. So if you do:
>
> location.hash = "doug turner";
>
> then location.hash will be "doug turner".
Which is not what's happening here.
I tested on the latest Firefox Nightly (56.0a1 build 20170623151754)
Comment 2•9 years ago
|
||
Generally looks like a duplicate of bug 1184589...
| Reporter | ||
Comment 3•9 years ago
|
||
I didn't think so. That bug is WAI, Firefox changing to match the spec in preserving the %20 when it was there in the URL (as required by the spec) even though the UI is unescaping that and displaying it as a space.
In this case the URL contains an actual space character and Firefox is converting that INTO a %20, something the web-platform-test is explicitly verifying does NOT happen.
I think it's worth discussing this again, post firefox-57.
Flags: needinfo?(valentin.gosu)
Whiteboard: [necko-next]
Comment 6•8 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P2
Updated•8 years ago
|
Flags: webcompat?
Will wait for the github discussion to end before closing this bug.
Comment 8•8 years ago
|
||
We decided to change this in the URL Standard. It now aligns with Firefox for U+0020 in fragments.
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•