Make WordPress Core

Ticket #56855: 56855.1.diff

File 56855.1.diff, 1.4 KB (added by pbiron, 3 years ago)
  • src/wp-includes/kses.php

    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 b function safecss_filter_attr( $css, $deprecated = '' ) { 
    23712371                        'direction',
    23722372                        'float',
    23732373                        'list-style-type',
     2374                        'object-fit',
    23742375                        'object-position',
    23752376                        'overflow',
    23762377                        'vertical-align',
  • tests/phpunit/tests/kses.php

    -- 
    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 b EOF; 
    11201120                                'css'      => 'color: rgb( 100, 100, 100, .4 )',
    11211121                                'expected' => '',
    11221122                        ),
     1123                        array(
     1124                                'css'      => 'object-fit: cover',
     1125                                'expected' => 'object-fit: cover',
     1126                        ),
    11231127                );
    11241128        }
    11251129