Make WordPress Core

Changeset 54764


Ignore:
Timestamp:
11/08/2022 04:35:26 AM (2 years ago)
Author:
peterwilsoncc
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, davidbaumwald.
Merges [54675] to the 5.9 branch.
Fixes #56855.

Location:
branches/5.9
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

  • branches/5.9/src/wp-includes/kses.php

    r52896 r54764  
    24162416            'float',
    24172417            'list-style-type',
     2418            'object-fit',
    24182419            'object-position',
    24192420            'overflow',
  • branches/5.9/tests/phpunit/tests/kses.php

    r52326 r54764  
    10941094                'expected' => 'background: conic-gradient(at 0% 30%, red 10%, yellow 30%, #1e90ff 50%)',
    10951095            ),
     1096            // `object-fit` introduced in 6.1.
     1097            array(
     1098                'css'      => 'object-fit: cover',
     1099                'expected' => 'object-fit: cover',
     1100            ),
    10961101            // Expressions are not allowed.
    10971102            array(
Note: See TracChangeset for help on using the changeset viewer.