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

The HTML sanitizer removes the MathML columnalign attribute

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • 18.10.0-rc-1
    • 14.6-rc-1
    • XML
    • None
    • Unknown

    Description

      The secure HTML element sanitizer allows the MathML attribute columnsalign, which doesn't exist, instead of columnalign, which aligns the cells in the columns of an mtable. As a consequence, columnalign is removed in restricted HTML cleaning (e.g., HTML macros written by users without script right).

      The typo was copied from DOMPurify, which fixed it in a later version.

      Steps to reproduce

      1. As a user without script right, create a page with:
        {{html}}
        <math xmlns="http://www.w3.org/1998/Math/MathML"><mtable columnalign="left"><mtr><mtd><mn>1</mn></mtd></mtr><mtr><mtd><mn>1000</mn></mtd></mtr></mtable></math>
        {{/html}}
        

      Expected: the numbers are left-aligned.
      Actual: the columnalign attribute is removed.

      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: