Encode or decode with encodeURIComponent, encodeURI or form mode
The result shows up hereWhen a value contains spaces, non-ASCII text or reserved characters such as & = #, percent-encoding stops them being parsed as part of the URL structure.
encodeURI keeps structural characters like : / ? #, so it suits a whole URL; encodeURIComponent encodes those too, so it suits a single query-parameter value.