convert str to %20 and the like in JS, then PHP convert back

A

Anonymous

Guest
I have strings's that are causing problems when being sent to a PHP script via JavaScript. (not all of it is getting sent)

i.e.

This is someone's line of text & it's rather long.

I wish to convert the whole string to some other format say like the spaces to %20 and and the & to & I think, and so on...

Then once the PHP script $_GET's the string it converts it back to the original.
 
Back
Top