Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

escape="false" for <s: property> tag

 
kedu par
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the use of escape="false" for <s: property> tag?

Thanks..
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To turn off HTML escaping, just like it says in the documentation.

http://struts.apache.org/2.x/docs/property.html
 
kedu par
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Can you explain this, by giving some simple code ....(What is meant by to escape HTML ?)

Thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...

You know how if you use a < in HTML it tries to interpret it as a tag? And how if you want a < to show up you have to use &lt;?

That's HTML escaping, and that's what the "escape" attribute controls--whether or not HTML is escaped.

Really, it would have been way quicker to search the web for "HTML escaping" then just try the tag with a property containing HTML and use both values for "escape".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic