Behaviour SwRS-MDOKFSTUDIO-GFM-031
Raw HTML tables are rebuilt from an allow-list
When a document contains a raw HTML table, the extension SHALL rebuild it from an allow-list of tags and attributes, rendering its cells with rowspan and colspan from 1 to 999, align, scope, simple class names, title and a sanitized style subset, and removing script, style, iframe, svg, form, embed and object elements with their content and dropping comments.
Step 2 of path 2 in StRS-MDOKFSTUDIO-GFM-002: from “The alert is drawn as an admonition, and the document holds a raw HTML table” to “The raw HTML table is drawn with its spans and safe colours”.
Step 2 of path 2 in StRS-MDOKFSTUDIO-MYST-017: from “A document holds a raw HTML table” to “The tables are shown as tables”.
Scenarios 6
The situations the tests check; open one to read it.
nominalSpans preserved
boundarySpan limits
nominalSafe colours kept
refusalUnsafe style removed
refusalActive content removed
| Input | Outcome |
|---|---|
| a raw table cell containing a script element and an iframe element with text inside | both are removed with their content |
| a table cell with a script element | the script is dropped |
| style, svg, form, embed or object elements in a cell | removed with their content |