commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Littlejohn (Created) (JIRA)" <>
Subject [jira] [Created] (LANG-797) StringEscapeUtils.escapeJson
Date Wed, 28 Mar 2012 16:35:27 GMT

                 Key: LANG-797
             Project: Commons Lang
          Issue Type: New Feature
          Components: lang.*
    Affects Versions: 2.6
            Reporter: Joe Littlejohn
            Priority: Minor

It would be great to offer a StringEscapeUtils.escapeJson method which is similar to StringEscapeUtils.escapeJavaScript
but will not escape apostrophe (single-quote) chars. 

The current escapeJavaScript method does escape single-quote chars, but this produces invalid
JSON. A good description of the problem can be found here:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message