browserstate / history.js

History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype. For HTML5 browsers this means that you can modify the URL directly, without needing to use hashes anymore. For HTML4 browsers it will revert back to using the old onhashchange functionality.
http://browserstate.github.com/history.js/demo/
Other
10.76k stars 1.35k forks source link

replaceState removes first character of hash (#) when it contains dot "." #477

Open romangazarek opened 6 years ago

romangazarek commented 6 years ago

Go to this demo URL: http://browserstate.github.io/history.js/demo/#hash.with.dots

it is modified to: http://browserstate.github.io/history.js/demo/hash.with.dots

Line of code: https://github.com/browserstate/history.js/blob/d213d8cb22e8fd1cf1c9963925e4989f8903b483/scripts/uncompressed/history.js#L1703

Third argument currentState.url contains bad URL