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

JSONTool is not escaping solidus (/)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.4
    • Fix Version/s: None
    • Component/s: Velocity
    • Labels:
      None
    • Similar issues:

      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response: