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

velocity #set directives don't work when executed by parseContent and a syntax2.0 document has been rendered.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 2.2.1
    • {Unused} Rendering 1.0
    • None
    • Unknown

    Description

      test case:
      Create a syntax 1.0 document like this:

      <% println(context.getContext().getWiki().parseContent("\#set(\$test = 'Hello World') \$test", context.getContext())); %>
      

      Create a syntax 2.0 document like this:

      {{groovy}}println(xcontext.getContext().getWiki().parseContent("#set($test = 'Hello World') $test", xcontext.getContext()));{{/groovy}}
      

      $ and # are escaped in 1.0 version because everything is parsed as velocity before being executed by groovy.
      Note the syntax1.0 version works while the syntax 2.0 version doesn't.

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            calebjamesdelisle CalebJamesDeLisle
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: