Make WordPress Core

Ticket #47281: 47281.diff

File 47281.diff, 1.4 KB (added by peterwilsoncc, 5 years ago)
  • src/wp-includes/kses.php

    diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php
    index 2b96e84a47..d73c5e8ff1 100644
    a b function safecss_filter_attr( $css, $deprecated = '' ) { 
    20632063         * @since 5.0.0 Added support for `background-image`.
    20642064         * @since 5.1.0 Added support for `text-transform`.
    20652065         * @since 5.2.0 Added support for `background-position` and `grid-template-columns`
     2066         * @since 5.3.0 Added support for `flex`, `flex-grow`, `flex-shrink`, and `flex-basis`.
    20662067         *
    20672068         * @param string[] $attr Array of allowed CSS attributes.
    20682069         */
    function safecss_filter_attr( $css, $deprecated = '' ) { 
    21332134                        'padding-left',
    21342135                        'padding-top',
    21352136
     2137                        'flex',
     2138                        'flex-grow',
     2139                        'flex-shrink',
     2140                        'flex-basis',
     2141
    21362142                        'clear',
    21372143                        'cursor',
    21382144                        'direction',
  • tests/phpunit/tests/kses.php

    diff --git a/tests/phpunit/tests/kses.php b/tests/phpunit/tests/kses.php
    index b359452b88..98c2987c2e 100644
    a b EOF; 
    830830                                'css'      => 'background: green url("foo.jpg") no-repeat fixed center',
    831831                                'expected' => 'background: green url("foo.jpg") no-repeat fixed center',
    832832                        ),
     833                        // `flex` and related attributes introduced in 5.3.
     834                        array(
     835                                'css'      => 'flex: 0 1 auto;flex-basis: 75%;flex-shrink: 0;flex-grow: 1',
     836                                'expected' => 'flex: 0 1 auto;flex-basis: 75%;flex-shrink: 0;flex-grow: 1',
     837                        ),
    833838                );
    834839        }
    835840