Skip to content
Permalink
Browse files Browse the repository at this point in the history
XWIKI-20260: Improved escaping of VFSTreeMacro
  • Loading branch information
manuelleduc committed Dec 16, 2022
1 parent 147cfae commit fad0232
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -55,6 +55,12 @@
<type>xar</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-rendering-xwiki</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Needed for Wiki Macros -->
<dependency>
<groupId>org.xwiki.platform</groupId>
Expand Down
Expand Up @@ -250,7 +250,9 @@
</property>
<property>
<code>{{velocity}}
{{tree root="$xcontext.macro.params.root" reference="path:$xwiki.getURL($doc.getDocumentReference(), 'get', 'sheet=Macros.VFSTreeJSON&amp;outputSyntax=plain')" links="true"/}}
#set ($root = $services.rendering.escape($xcontext.macro.params.root, 'xwiki/2.1'))
#set ($reference = $services.rendering.escape("path:$xwiki.getURL($doc.getDocumentReference(), 'get', 'sheet=Macros.VFSTreeJSON&amp;outputSyntax=plain')", 'xwiki/2.1'))
{{tree root="$root" reference="$reference" links="true"/}}
{{/velocity}}</code>
</property>
<property>
Expand Down

0 comments on commit fad0232

Please sign in to comment.