I try to extract parameter from URL, but one parameter has space which is replaced with "+", so the parameter I extract is "iphone+4", but actually it is "iphone 4", how can I convert to the second form, decodeURIComponent does not work here.
function decodeParameter(param) {
return decodeURIComponent(param.replace(/\+/g, ' '));
}
"iPhone+4".replace("+"," ");
That should do it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With