Make WordPress Core


Ignore:
Timestamp:
09/07/2022 03:22:09 PM (21 months ago)
Author:
SergeyBiryukov
Message:

KSES: Revert [54092] for now to address unit test failures.

See #55966.

File:
1 edited

Legend:

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

    r54092 r54093  
    22292229 * @since 5.7.1 Added support for `object-position`.
    22302230 * @since 5.8.0 Added support for `calc()` and `var()` values.
    2231  * @since 6.1.0 Added support for `min()`, `max()`, `minmax()`, and `clamp()` values.
    22322231 *
    22332232 * @param string $css        A string of CSS rules.
     
    24692468
    24702469        if ( $found ) {
    2471             // Allow some CSS functions.
    2472             $css_test_string = preg_replace( '/\b(?:calc|min|max|minmax|clamp)\(((?:\([^()]*\)?|[^()])*)\)/', '', $css_test_string );
    2473 
     2470            // Allow CSS calc().
     2471            $css_test_string = preg_replace( '/calc\(((?:\([^()]*\)?|[^()])*)\)/', '', $css_test_string );
    24742472            // Allow CSS var().
    2475             $css_test_string = preg_replace( '/\(?var\(--[\w\-\()[\]\,\s]*\)/', '', $css_test_string );
     2473            $css_test_string = preg_replace( '/\(?var\(--[a-zA-Z0-9_-]*\)/', '', $css_test_string );
    24762474
    24772475            // Check for any CSS containing \ ( & } = or comments,
Note: See TracChangeset for help on using the changeset viewer.