my dog learned polymorphism
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

How to escape quote characters (")?

Konstantin Kamsky

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

Joined: Sep 29, 2008
Posts: 12617

Escape them on the server side, use a JSP EL function, etc.
I agree. Here's the link:
subject: How to escape quote characters (")?
It's not a secret anymore!