Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-2688

HTML cleaner doesn't consider math, embed, img, data, object, picture, video, iframe, template and q as phrasing content

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 15.3, 14.10.9
    • 14.1-rc-1
    • XML
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      In an HTML macro with cleaning enabled, use any of the tags math, embed, img, data, object, picture, video, iframe, template or q inside, e.g., a strong tag.

      Expected result:

      The tag is preserved.

      Actual result:

      The tag is moved outside the strong-tag. The template tag is even completely removed.

      This is because the definition of phrasing content for HTML 5 in HtmlCleaner is incomplete and misses the mentioned tags. Further, while the template tag is included in the list of phrasing tags, it misses a proper definition so it is removed as unknown tag.

      This is a regression introduced with the switch to the HTML 5 tag definitions. This also affects parsing of HTML to XWiki syntax, in particular in combination with images (the other tags shouldn't affect XWiki syntax).

      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: