Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1813

Update json.org JSONObject to fix unicode character encoding issue

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Commons JSON 2.0.2, Commons JSON 2.0.4
    • Commons JSON 2.0.6
    • Commons
    • None

    Description

      Special unicode characters like the LS (\u2028) line separator in a string value make the generated json invalid. This seems to be fixed in the latest version of the json.org library, but sling's copied version of it does not handle it. Compare the quote() method (switch default case):

      http://www.JSON.org/java/org/json/JSONObject.java

      http://svn.apache.org/viewvc/sling/trunk/bundles/commons/json/src/main/java/org/apache/sling/commons/json/JSONObject.java?revision=785979&view=markup

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            justinedelson Justin Edelson
            alexander.klimetschek Alexander Klimetschek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment