mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 11:14:35 +08: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:
parent
5bf06f2634
commit
9a07a9872f
@ -34,7 +34,11 @@ export function setup(helper) {
|
|||||||
"thead",
|
"thead",
|
||||||
"tr",
|
"tr",
|
||||||
"th",
|
"th",
|
||||||
|
"th[colspan]",
|
||||||
|
"th[rowspan]",
|
||||||
"td",
|
"td",
|
||||||
|
"td[colspan]",
|
||||||
|
"td[rowspan]",
|
||||||
"div.md-table",
|
"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>" data-html-value="<something>"></div>`,
|
||||||
`<div data-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) {
|
test("ids on headings", function (assert) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user