Closed Bug 1207524 Opened 9 years ago Closed 9 years ago

hash string auto encode when using location = <url>

Categories

(Firefox :: Untriaged, defect)

41 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1184589

People

(Reporter: wangxiaofan0529, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.93 Safari/537.36

Steps to reproduce:

open http://www.google.com
open console debugger, run code window.location = 'http://www.google.com#a a' (there is a space in hash)
after the broswer redirect, run window.location.hash to see the hash string


Actual results:

expect hash string to be '#a a'


Expected results:

actually '#a%20a'
the hash string is url encoded.
This does not be the same as chrome and ie.
And its behavior become weird when using window.location = 'http://www.google.com#a%20a'  and still get a  '#a%20a' hash string.
Seems FF will encode the hash string only when it is not encoded. This makes me confuse when i'm using hash string to passing some parameters.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.