Hi,
I am having a problem with users entering characters such as ' and " into a form which javascript then sends the variables via ajax to the server.
The user is trying to enter, example:
Hello, <a href='http://www.mydomain.com'>thisisalink</a>
With that is entered it returns an error:
malformed URI sequence
if (value != undefined) value = decodeURIComponent(value);
(This is from prototype.js)
However, if I take the text and re-type the ' and " manually they submit fine without any encoding errors.
I've tried; escape, encodeURI and encodeURIComponent and still no success.
What Javascript encoding should I be using?
Thanks!