Re: Struts7: looking for constant to set escapeHtml=false

Lukasz Lenart <[email protected]> Sat, 22 Mar 2025 16:45:14 +0100
Newsgroups gmane.comp.jakarta.struts.user
Message-ID <CAMopvkPhogbYAvGG0k99UqE2X3icqP43m9KQ9JhFVvBsn=3K8w@mail.gmail.com>
sob., 22 mar 2025 o 15:19 Ute Kaiser <[email protected]> napisał(a):
>
> My application output is XML (not HTML), but German umlaute (ä,ö,ü) are escaped for <s:property> and let the XML output crash in browser.
> Is there a way to configure e.g. struts.xml to set escapeHtml=false?
> (instead of adding it to every single row in every jsp)
>
> Part of my application is XML (display data only)
> Rest is HTML (data processing)
> Each part has its own struts.xml, but only one common struts.jar, so I can not change struts source.
>
> Migrating from Struts1 due to jakarta, hard enough...

There is "struts.ui.escapeHtmlBody" [1] but it doesn't include
<s:property/> but maybe you can create a custom tag using
<s:component/>

[1] https://struts.apache.org/tag-developers/tag-syntax#escaping-body-of-a-tag
[2] https://struts.apache.org/tag-developers/component-tag


Cheers
-- 
Łukasz