struts2 - How to display HTML markup content from database record to browser properly in Struts 2? -
i have simple text stored in database record: hello wrapped in h1 tag.
when print record in jsp <s:property /> tag, displays:
<h1>hello</h1> while want displayed like:
hello
how can interpreted value, instead of source value ?
you need set escapehtml attribute of <s:property/> tag false because, security reasons, true default:
<s:property value="myvar" escapehtml="false" /> read more on docs.
Comments
Post a Comment