Is there a way to replace every \"%20\" with a space using JavaScript. I know how to replace a single \"%20\" with a space but how do I replace all of them?
Check this out: How to replace all occurrences of a string in JavaScript?
Short answer:
str.replace(/%20/g, " ");
EDIT: In this case you could also do the following:
decodeURI(str)