Make WordPress Core

Changeset 54676


Ignore:
Timestamp:
10/24/2022 03:56:05 PM (2 years ago)
Author:
davidbaumwald
Message:

Media: Add object-fit to the allowed list of CSS properties.

This resolves a bug in Featured Image blocks where object-fit was being removed during the render_callback.

Props raduiason, pbiron, kebbet, SergeyBiryukov, bernhard-reiter, ironprogrammer, xknown, audrasjb, ckanderson22, ivanjeronimo, seriouslysenpai.
Reviewed by SergeyBiryukov.
Merges [54675] to the 6.1 branch.
Fixes #56855.

Location:
branches/6.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.1/src/wp-includes/kses.php

    r54181 r54676  
    23902390            'float',
    23912391            'list-style-type',
     2392            'object-fit',
    23922393            'object-position',
    23932394            'overflow',
  • branches/6.1/tests/phpunit/tests/kses.php

    r54203 r54676  
    11081108                'expected' => 'background: conic-gradient(at 0% 30%, red 10%, yellow 30%, #1e90ff 50%)',
    11091109            ),
     1110            // `object-fit` introduced in 6.1.
     1111            array(
     1112                'css'      => 'object-fit: cover',
     1113                'expected' => 'object-fit: cover',
     1114            ),
    11101115            // Expressions are not allowed.
    11111116            array(
Note: See TracChangeset for help on using the changeset viewer.