YahooArchive / fluxible-router

MOVED TO FLUXIBLE REPO
104 stars 26 forks source link

Fix issue with unicode url causing 2 state entries pushed on navigation #80

Closed lingyan closed 9 years ago

lingyan commented 9 years ago

@mridgway @redonkulus cc:// @pumpikano

This issue was also described in https://github.com/yahoo/fluxible-router/issues/66.

It is because if you have unicode in the navigate url, History.getUrl() will return encoded string instead of the original url. Therefore failing this url check: https://github.com/yahoo/fluxible-router/blob/228b123bc4f0a22151333a4aab6a6a48e0865c2c/lib/handleHistory.js#L158

This fix will work for modern browsers that support history pushState. For older browsers, we'll leave it as a known issue.

mridgway commented 9 years ago

:rocket:

yahoocla commented 9 years ago

CLA is valid!