Opened 10 years ago
Closed 10 years ago
#29433 closed defect (bug) (fixed)
KSES should allow colgroup
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Formatting | Keywords: | good-first-bug has-patch kses 4.1-early |
Focuses: | Cc: |
Description
We allow users without unfiltered_html to use the col element but not the colgroup element.
TinyMCE strips out col elements that are not inside colgroups ...
The col element seems supported in TinyMCE. However, It has "weird" rules: can only be a child of a colgroup element, which can only be a child of a table element and can only be at the top of the table before thead, tfoot, tbody but after caption. Ref: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col and https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup.
The difference in TinyMCE is that it is "strict". It requires that col elements are always inside a colgroup.
It looks like adding:
'colgroup' => array( 'align' => true, 'char' => true, 'charoff' => true, 'span' => true, 'valign' => true, 'width' => true, ),
to the KSES config for posts will resolve this.
Adding colgroup to the $allowedposttags array.