Uploaded image for project: 'XWiki Rendering'
  1. XWiki Rendering
  2. XRENDERING-715

Footnote macro content cannot reference content outside of the macro

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      For example:

      = {{id name="MyID"/}}Title =
       
      Hello{{footnote}}See {{reference id="MyID"/}} or {{reference id="HTitle"/}} for an explanation.{{/footnote}}.
      

      Leading to:

      Analysis:

      When the reference macro executes, it executes with an XDOM context which is the XDOM from the content of the footnote macro. See https://github.com/xwiki/xwiki-rendering/blob/cc043e8e41bc5e8b3789416f6aed0689f0756152/xwiki-rendering-transformations/xwiki-rendering-transformation-macro/src/main/java/org/xwiki/rendering/internal/macro/DefaultMacroContentParser.java#L145

      This is called by https://github.com/xwiki/xwiki-rendering/blob/5f558b8fac8b716d19999225f38cb8ed0814116e/xwiki-rendering-macros/xwiki-rendering-macro-footnotes/src/main/java/org/xwiki/rendering/internal/macro/footnote/FootnoteMacro.java#L128

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: