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

Invalid HTML generated when a macro that is called inline produces block level content

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Critical
    • None
    • 10.6
    • None
    • Unknown

    Description

      Take the following example:

      before {{include reference="Some.Page"/}}
      
      after
      

      We can use the Include Macro inline because it supports inline mode but it can also generate block level content depending on the content of the included page. The rendering should make sure the generated HTML is valid otherwise we break the WYSIWYG editor.

      Another example is:

      before
      {{info}}
      one
      
      two
      {{/info}}
      
      after
      

      In this case the Info Macro supports inline mode but has block level content. I agree that writing this directly in the Wiki Editor doesn't make much sense but the WYSIWYG editor has no idea whether the inserted macro produces block level content until it actually executes the macro. And it doesn't execute the macro alone. It has to render the entire page, otherwise the output of the macro could be different. And the output of the rendering is invalid HTML which breaks the editor.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mflorea Marius Dumitru Florea
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: