|
Summary: |
Escaping of page references won't work in documentTree macro |
Issue Type: |
Bug |
Affects Versions: |
16.2.0 |
Assignee: |
Unassigned |
Components: |
Component |
Created: |
02/Jan/25 19:18 |
Environment: |
Windows 11, Ubuntu 22 |
Priority: |
Major |
Reporter: |
Christian Fröhlich |
Description: |
I tried to exclude some pages in the Navigation and created my own Panel. Added the Following code to the default Navigation Panel: ```
-
- Exclude all pages below tag "hiddenSubpages"
#set($hiddenSubpages = $services.query.xwql("from doc.object(XWiki.TagClass) as tag where 'hiddenSubpages' member of tag.tags").execute()) #foreach($hiddenSubpage in $hiddenSubpages) #set ($hiddenSubpageWildCard = $hiddenSubpage.replaceAll(".WebHome$", ".%")) #set($children = $services.query.xwql("where doc.fullName like :name").bindValue("name", $hiddenSubpageWildCard).execute()) #foreach($child in $children) #if($child != $hiddenSubpage) #set ($discard = $exclusions.add("document:" + $child.replaceAll(",", " ,")))) #end #end #end
``` I tested it with the replace of " .", "\," "%2C" and without replace. In all versions of the macro, Pages with a comma are not filtered. |
|