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

Children macro not working for a document with a double quote in its name

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.6.1
    • Fix Version/s: None
    • Component/s: Index
    • Labels:
    • Difficulty:
      Trivial
    • Similar issues:

      Description

      When using the children macro for a document with (at least) a double quote in its name, the behaviour is incorrect:

      • if a single double quote is present, some code with {{documentTree ... will be displayed
      • if two double quotes are present, either no results are displayed or the children tree of the parent is displayed.

      This is because, in the code of the children macro, the name of the current document is used as a parameter of the documentTree macro without escaping the double quotes (which is equally a parameter separator for the macro parameters). The line is here https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-index/xwiki-platform-index-tree/xwiki-platform-index-tree-macro/src/main/resources/XWiki/ChildrenMacro.xml#L164

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lucaa Anca Luca
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Date of First Response: