mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 06:52:46 +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",
|
||||
"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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user