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

XWikiDocument#display should check if we are inside an html macro

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 13.10.3
    • Old Core
    • None
    • Unknown

    Description

      XWikiDocument#display always wraps the output in an html macro if the displayer produces html. The problem is that it does not check if we are already inside an html macro, which might lead to bad pattern such as closing an html macro before calling display() or even, stripping the html macro wrapping after the call.

      The method should probably checks if we're already inside an html macro to avoid this wrapping in such case.
      See an example of such usage: https://github.com/xwiki/xwiki-platform/pull/1733#discussion_r774453667

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              surli Simon Urli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: