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

The annotated HTML5 renderer should not render figcaption inside macros

    XMLWordPrintable

Details

    • Unit
    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      Currently, the annotated HTML5 parser always renders <figcaption>-tags when handling the beginFigureCaption-event. However, after fixing XRENDERING-630 they will be nested in a <div> from CKEditor for the widget and also the editable content div after fixing XRENDERING-629 (that's why this bug concerns 14.0-rc1 as it only becomes an issue after fixing these two bugs, however it is still a separate issue). Unfortunately, in HTML5, <figcaption>-tags can only be the direct children of a <figure>-tag so this creates invalid HTML5 that is corrected by CKEditor by moving the <figcaption> with its content outside the wrapping macro directly below the wrapping <figure>-tag. To fix this, I propose to instead render something like a <div class="figcaption"> so the caption can still be targeted using CSS, see also XRENDERING-625.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: