From e80e9c4acb3d7f7ab9b6b352f219d1b570443bd8 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 2 Apr 2021 12:39:57 +0000 Subject: [PATCH] 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. Fixes #52961. git-svn-id: https://develop.svn.wordpress.org/trunk@50634 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/kses.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index b7f135377c..fa3b343cac 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -2171,6 +2171,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) { * @since 5.3.0 Added support for `grid`, `flex` and `column` layout properties. * Extend `background-*` support of individual properties. * @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. */ @@ -2284,6 +2285,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) { 'direction', 'float', 'list-style-type', + 'object-position', 'overflow', 'vertical-align', )