diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 0ef5803ebc7b4..cd30d845f83af 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -2526,6 +2526,7 @@ function safecss_filter_attr( $css, $deprecated = '' ) { 'list-style-type', 'object-fit', 'object-position', + 'opacity', 'overflow', 'vertical-align', 'writing-mode', diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php index ea65a89092c07..b5cca81047172 100644 --- a/tests/phpunit/tests/kses.php +++ b/tests/phpunit/tests/kses.php @@ -1353,6 +1353,11 @@ public function data_safecss_filter_attr() { 'css' => 'background-repeat: no-repeat', 'expected' => 'background-repeat: no-repeat', ), + // `opacity` introduced in 6.7. + array( + 'css' => 'opacity: 10', + 'expected' => 'opacity: 10', + ), ); }