Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2332

Escape values for JavaScript

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1
    • 2.1.6
    • Other
    • None

    Description

      There's not an easy, safe way to escape output for inclusion in JavaScript at the present time.
      I'd like to see an attribute added to the property tag, called escapeJavaScript or something similar, which would output a property in JavaScript escaped format (most importantly, single quotes as \').
      For more background on why I believe it is necessary you can view the mailing thread:
      http://www.nabble.com/Escaping-Characters-in-Struts-Property-Tag-tf4799846.html#a13732294

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chengas123 Ben McCann
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: