I have rather silly problem. Struts2 property tag doesn't escape single quote ('). Such behavior breaks my JavaScript code. It does do escape double quote (") using html entities, but not single quote ('). Is there any possibility to force property tag to replace single quote with appropriate html entity?
Example, string replaced with html entities. Отредактированное событие с кавычкой "
The same with single qoute: Отредактированное событие с кавычкой '
Is there any possibility to overcome such difficulty using standard approach? I wouldn't like to write some custom code.
You're in luck! By default, the tag only escapes HTML, but you can have it escape JavaScript too:
<s:property value="yourValue" escapeJavaScript="true"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With