Replace + with a blank space and replace %40 with @ in Javascript from Get method form

I’m using getQueryVariable(“FirstAndLastName”); to get data from a URL which gets that data from a form using the Get method. How do I use JS to replace the + between words with a blank space, and replace the %40 with @ when I save them as variables?

decodeURI() - JavaScript | MDN (
String.prototype.replace() - JavaScript | MDN (

For some reason this solution worked for me.

That will work in some circumstances, but what if your get request returns other characters that have been encoded?

I am not sure but it works for my limit purposes so I am happy. :grinning:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.