Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1120

JSONTool is not escaping solidus (/)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 15.0-rc-1, 14.10.1
    • 7.4
    • Velocity
    • None
    • Unit
    • N/A
    • N/A

    Description

      The json spec says that / must be escaped as \/, see http://json.org/ for example.

      To reproduce:

      {{velocity}}
      #set ($map = {'a': 'a/b'})
      $jsontool.serialize($map)
      {"a":"$escapetool.json('a/b')"}
      {{/velocity}}
      

      results in

      {"a":"a/b"}
      {"a":"a\/b"}
      

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: