js string to url formate replace spave code example Example: javascript how to deal with %20 in string decodeURI(str)