In firefox, using this javascript:
top.location.hash = "#here%20are%20spaces";
changes the browser url to:
http://mysite.com/#here are spaces
I expected firefox to show the encoded spaces as %20 in the browser url.
- What's going on here? Why is firefox not setting the url to the string as I passed it?
- How can I force firefox to update the url with the encoded characters?
and...
If I add set the url to
top.location.hash = "#here%20are%20spaces%";
It works(!?), albeit with an extra unwanted % appended to the end. I am not sure if this is a bug or a feature. Ideas or references on how to proceed?