Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-9680

Apostrophes in static list value are encoded on .display()

    Details

    • Tests:
      Unit
    • Development Priority:
      High
    • Difficulty:
      Easy
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      We have a document with an object of class "MyApp.MyClass" inside. This object has a static list property with values keys (which are translated in a translations document) .
      Translations are something as follows:

      MyApp.MyClass_prop_0=Foo's
      MyApp.MyClass_prop_1=Bar's
      MyApp.MyClass_prop_2=FooBar's
      

      . We have the following code in a test document:

      {{velocity}}
      #set($myDoc = $xwiki.getDocument("MySpace.MyDoc"))
      raw: $myDoc.display('prop')
      with html: {{html clean="false" wiki="false"}}$myDoc.display('prop'){{/html}}
      {{/velocity}}
      

      On 4.1.4 it displays:

      raw: Foo's
      with html: Foo's
      

      On 5.2 it displays:

      raw: Foo's
      with html: Foo's
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                lucaa Anca Luca
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: