I'm not sure of the forum this should be in, but thought I'd be safe to start in this one.
I have a
JSP that displays
string values in HTML input elements. In the code, we enclose the value in double quotes so that string values containing spaces are properly displayed. This was all fine n dandy until someone tried a string containing double quotes. The value displayed would then cut off at the first double quote, since it would see that as the closing quote.
The JSP code in question.
So, I would like to find a way to properly display a string that could potentially contain spaces, double quotes and anything, really. I tried using URLEncoder on the values in the JSP code, and then using javascript to decode, but it basically just ends up at square one. I can't quite wrap my head around what I need to do here, and I've done plenty of googling. There seem to be some PHP methods that take care of this (not positive they do what I need) and I've tried the javascript versions of these, but no luck.
If anyone has any ideas/information on this, I'd appreciate it.
thanks,
Tom