tags:

views:

356

answers:

2

Hi I'm using Struts 1.2 and I installed TinyMCE. The problem is that struts is converting all HTML tags into entities. How do I disable or configure this to allow only selected tags?

+1  A: 

Use the filter parameter (taglib).

<bean:write name="someField" filter="false"/>
Pool
Can I choose which tags to filter?
ajushi
Do you mean override the default behaviour of the tag rather than specify filter on each tag? If so, I think you'd have to hack around with the struts jars.
Pool
Sorry for the confusion, I mean can I specify what HTML tags to filter and what not to filter?
ajushi
The filtering doesn't look at or understand HTML tags, it just replaces a few characters, see http://www.docjar.com/html/api/org/apache/struts/taglib/TagUtils.java.html#x616If you want to do this the easiest way is probably to create a special getter and put the logic in there.
Pool
A: 

Thanks, I was looking for this but in Struts 2, and this helped, it's similar:

<s:property value="variable" escape="false" />
Ricardo