This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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 (")?