How can I decode a url in JavaScript or JQuery?
An example: I've got this url:
http://localhost:8080/map/file.html?var1=a%20b%20c&var2=d%20e%20f
If I use code below,
var str = "var1=a%20b%20c&var2=d%20e%20f";
document.write(str.replace("%20", " "));
I've got this:
http://localhost:8080/map/file.html?var1=a b%20c&var2=d%20e%20f
What is the fast en the best way to decode the url?