Add javaScriptEscape attribute to propertyTag
---------------------------------------------
Key: WW-2555
URL: https://issues.apache.org/struts/browse/WW-2555
Project: Struts 2
Issue Type: New Feature
Reporter: Jelmer Kuperus
Attachments: xwork.patch
Currently if you want to use a property value in a piece of javascript you have
to take care of escaping special characters such as \r \n \t , single quotes
etc yourself. Otherwise you might end up with unclosed string literals etc. The
way we solved this in out application is to wrap the output of a struts
property within the body of another tag that does the escaping. eg:
alert('<lib:javaScriptEscape><s:property value="myProperty"
javaScriptEscape="true" /></lib:javaScriptEscape>');
This works well but is somewhat verbose. It would be very convenient if
s:property would have a javaScriptEscape attribute to acomplish the same task.
eg :
alert('<s:property value="myProperty" javaScriptEscape="true" />');
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.