You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Stepanenko <an...@gmail.com> on 2006/11/22 23:31:19 UTC

[s2] and HTML content from DB

Hello,

I have content stored in MySQL DB in HTML format, but when I try to
display it in my page using <s:property> tag, symbols '<' and '>' are
replaced with '&lt;' and '&gt>', thus the HTML code is displayed
instead of being rendered by the browser. Is there any option to tell
struts not to replace '<' and '>' while displaying content?

In the DB HTML is stored normally in ASCII, so that <br> is <br> and
not &lt;br&gt; .

Thanks,
Andrew Stepanenko

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [s2] and HTML content from DB

Posted by Andrew Stepanenko <an...@gmail.com>.
ok, I found the solution: adding escape="false" to <s:property> tag
will do the work.


On 11/23/06, Andrew Stepanenko <an...@gmail.com> wrote:
> Hello,
>
> I have content stored in MySQL DB in HTML format, but when I try to
> display it in my page using <s:property> tag, symbols '<' and '>' are
> replaced with '&lt;' and '&gt>', thus the HTML code is displayed
> instead of being rendered by the browser. Is there any option to tell
> struts not to replace '<' and '>' while displaying content?
>
> In the DB HTML is stored normally in ASCII, so that <br> is <br> and
> not &lt;br&gt; .
>
> Thanks,
> Andrew Stepanenko
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org