[wp-trac] [WordPress Trac] #29433: KSES should allow colgroup

WordPress Trac noreply at wordpress.org
Fri Aug 29 18:01:19 UTC 2014


#29433: KSES should allow colgroup
--------------------------+----------------------------------------
 Reporter:  westi         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  trunk
 Severity:  normal        |   Keywords:  good-first-bug needs-patch
  Focuses:                |
--------------------------+----------------------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29433>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list