0

I have this code to perform searches in my site:

var encoded = encodeURIComponent($("#searchBar").val());
location.href = sitePath + "/search/keyword/" + encoded;

Because i'm italian I use a lot chars like à è ù, but when I put them in search3w they're not correctly encoded.

If i try to console log encoded var it will print correctly encoded chars for URLs, but when the script does the effective redirect to te page i have things like http://www.mysite.it/search/à and chars are not well received.

4

1 に答える 1

0

encodeURIComponent 関数に問題がある可能性があると思います。デバッグにfirebugを使用しましたか?

よろしく、 dan8912

于 2013-09-05T14:32:11.457 に答える