We use some special characters in our web application as follows: example.com/foo# .
We analyze the hash with decodeURI(window.location.hash) (and sometimes the hash contains non-encoded special characters) and set the new value as window.location.hash = "" .
Everything works fine in Chrome, Firefox, Opera and even IE, but in Safari we get 20? instead of .
If the specified hash is in Safari, for example, window.location.hash = encodeURI(""); It works, but of course it does not work in Chrome, FF and others.
source share