KSES: Add `object-position` to the list of safe CSS properties.

This resolves an issue with the Cover block, where the `object-position` property is removed from the content when a non-admin user saves the post, leading to block recovery loop.

Props Mamaduka, aristath.
Merges [50634] to the 5.7 branch.
Fixes #52961.
Built from https://develop.svn.wordpress.org/branches/5.7@50649


git-svn-id: http://core.svn.wordpress.org/branches/5.7@50261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-04-02 19:31:06 +00:00
parent 4fa46b8d14
commit 8bda8b2847
2 changed files with 3 additions and 1 deletions

View File

@ -2171,6 +2171,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
* @since 5.3.0 Added support for `grid`, `flex` and `column` layout properties. * @since 5.3.0 Added support for `grid`, `flex` and `column` layout properties.
* Extend `background-*` support of individual properties. * Extend `background-*` support of individual properties.
* @since 5.3.1 Added support for gradient backgrounds. * @since 5.3.1 Added support for gradient backgrounds.
* @since 5.7.1 Added support for `object-position`.
* *
* @param string[] $attr Array of allowed CSS attributes. * @param string[] $attr Array of allowed CSS attributes.
*/ */
@ -2284,6 +2285,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
'direction', 'direction',
'float', 'float',
'list-style-type', 'list-style-type',
'object-position',
'overflow', 'overflow',
'vertical-align', 'vertical-align',
) )

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.7.1-alpha-50630'; $wp_version = '5.7.1-alpha-50649';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.