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

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

    XMLWordPrintable

Details

    • Unit
    • High
    • Easy
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: