url encoding how to replace space with + instead of %20 in javascript code example Example: javascript string spaces replace with %20 string.replace()