Opened 6 years ago
Closed 6 years ago
#47281 closed enhancement (fixed)
Editor: KSES: Include Flex properties in CSS whitelist to support core Column block width
Reported by: | aduth | Owned by: | peterwilsoncc |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | has-patch |
Focuses: | Cc: |
Description
Related: #46597 (r45242)
Related: https://github.com/WordPress/gutenberg/pull/15499
As of Gutenberg 5.7, the Column block supports a width
attribute which is implemented by applying a flex-basis
inline style to the block's produced markup. This style attribute is not currently included in the `safe_style_css` filtered array and thus would be removed by users not privileged with the `unfiltered_html` capability (filtered by Gutenberg). As was done with #46597, the default filtered array should be modified to include this new style attribute. This is only necessary if and when the Column enhancements arrive in trunk.
It is an open question whether all (or common) flex attributes should be whitelisted. In my initial patch, I will propose the inclusion of the minimal set necessary for Column block support.
Attachments (3)
Change History (8)
#3
@
6 years ago
Thanks for the feedback @peterwilsoncc . I agree. The updated patch 47281.2.patch includes all properties of the `flex` shorthand.
#4
@
6 years ago
Added some tests in 47281.diff, the main purpose is flex-shrink: 0
to ensure a bug doesn't get introduced that deletes falsey values.
To ensure
flex-basis
is fully supported, let's add the related and shorthand properties as part of this ticket:flex
flex-shrink
flex-grow
All of these can be considered safe.