[wp-trac] [WordPress Trac] #46597: Grid properties stripped from style attribute after saving post

WordPress Trac noreply at wordpress.org
Wed Mar 27 19:15:16 UTC 2019


#46597: Grid properties stripped from style attribute after saving post
--------------------------+---------------------
 Reporter:  ryelle        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.2
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by aduth):

 At a minimum, I'd expect the `safecss_filter_attr` to include those style
 properties produced by blocks shipped with core. To this end, I've audited
 the save implementations of existing blocks, and discovered the following
 properties:

 - `background-color` (button, cover, paragraph, pullquote)
 - `background-image` (cover)
 - `background-position` (cover)
 - `border-color` (pullquote)
 - `color` (button, paragraph, pullquote)
 - `font-size` (paragraph)
 - `grid-template-columns` (media-text)
 - `height` (spacer)
 - `max-width` (image)
 - `text-align` (heading, paragraph, quote, subhead, verse)
 - `width` (image)

 Cross-referenced against the [https://github.com/WordPress/wordpress-
 develop/blob/5.1.1/src/wp-includes/kses.php#L2070-L2141 default
 `safe_style_css` set], here's what's missing:

 - `background-position`
 - `grid-template-columns`

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46597#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list