history.js
history.js copied to clipboard
Pushing state with urlEncode don´t work correct
I have one script in php using urlencode() [http://bit.ly/L1BYf4] with ajax for this example:
http://localhost/maclik/procurar/será
Resulting this:
http://localhost/maclik/procurar/ser%E1
But when I execute History.pushState() and push this url resulting this in adress bar for Chrome, Firefox, Opera:
http://localhost/maclik/procurar/ser%C3%A1
Value for this chars in Url Enconding Reference [http://bit.ly/L1BZPW] :
%E1 - á %C3 - Ã %A1 - ¡
But, when I try:
var State = History.getState();
alert(State.url);
Resulting this:
http://localhost/maclik/procurar/será
I don´t know whats going and I supose this is one bug in history.js encodeUrl.
Thanks for now
Hi,
I have the same issue, anybody has a solution for this one ?
"/search/a%2Fb%20testing" converted into => "/search/a/b%20testing"
I think I also have some kind of similar issue: ✓ = â It works in Firefox but fails in Chrome.
maybe someone will come in handy ... it worked correctly like this:
window.History.pushState( null, null, decodeURI(YOUR_URL_HERE));
wrap url in decodeURI(); function