wood burning stoves 2.0*
The moose likes Struts and the fly likes How to escape quote characters ( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to escape quote characters (")?" Watch "How to escape quote characters (")?" New topic
Author

How to escape quote characters (")?

Konstantin Kamsky
Greenhorn

Joined: May 27, 2010
Posts: 1
I use Struts 2. On my page I have
<input ... value="${someVariable}"/>
If someVariable has value with quotes (") it can broke the page.
I can't use <s:textfield> from Struts tag library. That <input> is in my own tag library.
What is the better way to escape quote characters?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Escape them on the server side, use a JSP EL function, etc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to escape quote characters (")?
 
Similar Threads
escaping strings using Struts html:text tag
Operator precedence
How to generate HTML to display XML
Javascript escape characters in a JSP
how can I embed javascript in an XSL