mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 06:25:11 -05:00
FEATURE: Allow rowspan and colspan attributes on HTML tables (#20973)
Augment the `allowList` for HTML tables to allow the `rowspan` and `colspan` attributes on `th` and `td` elements.
This commit is contained in:
@@ -34,7 +34,11 @@ export function setup(helper) {
|
||||
"thead",
|
||||
"tr",
|
||||
"th",
|
||||
"th[colspan]",
|
||||
"th[rowspan]",
|
||||
"td",
|
||||
"td[colspan]",
|
||||
"td[rowspan]",
|
||||
"div.md-table",
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -157,6 +157,11 @@ module("Unit | Utility | sanitizer", function (hooks) {
|
||||
`<div data-value="<something>" data-html-value="<something>"></div>`,
|
||||
`<div data-value="<something>"></div>`
|
||||
);
|
||||
|
||||
cooked(
|
||||
'<table><tr><th rowspan="2">a</th><th colspan="3">b</th><td rowspan="4">c</td><td colspan="5">d</td><td class="fa-spin">e</td></tr></table>',
|
||||
'<table><tr><th rowspan="2">a</th><th colspan="3">b</th><td rowspan="4">c</td><td colspan="5">d</td><td>e</td></tr></table>'
|
||||
);
|
||||
});
|
||||
|
||||
test("ids on headings", function (assert) {
|
||||
|
||||
Reference in New Issue
Block a user