Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to escape quote characters (")?

 
Konstantin Kamsky
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Escape them on the server side, use a JSP EL function, etc.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic