-
-
Save joshbuchea/065f746448d9621a227c to your computer and use it in GitHub Desktop.
Replace the plus sign which encode spaces in GET parameters using javascript.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function decodeUrlParameter(str) { | |
return decodeURIComponent((str+'').replace(/\+/g, '%20')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment