We are using some special characters in our web application like this: example.com/foo#вап
.
We parse hash using decodeURI(window.location.hash)
(and sometimes hash contains not encoded special characters) and set new value like window.location.hash = "вап"
.
Everything works fine in Chrome, Firefox, Opera and even IE, but in Safari we get 20?
instead вап
.
If set hash in Safari like window.location.hash = encodeURI("вап");
it works, but of course it doesn't work in Chrome, FF and others.
Finally I found the solution. If set hash through
window.location.href
everything works fine.Here is the code:
I have faced same issue, found another workaround