i have a variable called param, which has the value I told \"I will come\", in JSP am assigning this to a input tag’s value as
<input type="text" value="${param}"/>
what is happening is that the value am getting is I told \, i.e am getting value only till the first “, but am escaping this ” with a \,but still am getting this. how can I solve this?
Try this:
That will work when the escaping you need is in fact XML/HTML escaping. If you’re dropping the JSTL/EL expression into JavaScript code, however, that’s probably not what you want. In that case you’d want a JSON encoding function, of which there are several available I think (from Google at least). (I’ve got my own so I can’t provide direct information.)