From ceefd978e3b54e855b609c0298f2cc6ead209b50 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Wed, 19 Oct 2022 14:43:00 -0600
Subject: [PATCH] Add object-fit to the list of allowed CSS properties in
 safecss_filter_attr().

---
 src/wp-includes/kses.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php
index b32df1beaa..1223d8adaf 100644
--- a/src/wp-includes/kses.php
+++ b/src/wp-includes/kses.php
@@ -2371,6 +2371,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) {
 			'direction',
 			'float',
 			'list-style-type',
+			'object-fit',
 			'object-position',
 			'overflow',
 			'vertical-align',
-- 
2.30.2.windows.1

From 99d6d07eb59cae9fec9c6670c3965f1e06596d85 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Wed, 19 Oct 2022 15:14:47 -0600
Subject: [PATCH] Add a test case for object-fit.

---
 tests/phpunit/tests/kses.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php
index e6cac09c3b..c7e58e14b7 100644
--- a/tests/phpunit/tests/kses.php
+++ b/tests/phpunit/tests/kses.php
@@ -1120,6 +1120,10 @@ EOF;
 				'css'      => 'color: rgb( 100, 100, 100, .4 )',
 				'expected' => '',
 			),
+			array(
+				'css'      => 'object-fit: cover',
+				'expected' => 'object-fit: cover',
+			),
 		);
 	}
 
-- 
2.30.2.windows.1

