Skip to content

Instantly share code, notes, and snippets.

@bchapuis
bchapuis / decodeUrlParameter.js
Last active April 22, 2024 21:17
Replace the plus sign which encode spaces in GET parameters using javascript.
function decodeUrlParameter(str) {
return decodeURIComponent((str+'').replace(/\+/g, '%20'));
}