Search code examples
javastruts2escapinghtml-escape-characters

Struts2 Property tag default escape property


Is there any way that in struts2 we can set the default escapeXML property to false for all property tags?

I searched through this online, seems like I could only find one person saying that this is not possible. Does anyone have any idea how to do it?


Solution

  • No, the source of the component and property tags hard-code the default value to true.

    (I think you mean the escapeHtml attribute, since escapeXml defaults to false.)

    I can't think of a convenient way to do it other than creating custom tags that set it to true; if you use only a subset of the tag attributes, this wouldn't be too onerous.