Changeset 54092 for trunk/src/wp-includes/kses.php
- Timestamp:
- 09/07/2022 02:38:59 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r53034 r54092 2229 2229 * @since 5.7.1 Added support for `object-position`. 2230 2230 * @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. 2231 2232 * 2232 2233 * @param string $css A string of CSS rules. … … 2468 2469 2469 2470 if ( $found ) { 2470 // Allow CSS calc(). 2471 $css_test_string = preg_replace( '/calc\(((?:\([^()]*\)?|[^()])*)\)/', '', $css_test_string ); 2471 // Allow some CSS functions. 2472 $css_test_string = preg_replace( '/\b(?:calc|min|max|minmax|clamp)\(((?:\([^()]*\)?|[^()])*)\)/', '', $css_test_string ); 2473 2472 2474 // Allow CSS var(). 2473 $css_test_string = preg_replace( '/\(?var\(--[ a-zA-Z0-9_-]*\)/', '', $css_test_string );2475 $css_test_string = preg_replace( '/\(?var\(--[\w\-\()[\]\,\s]*\)/', '', $css_test_string ); 2474 2476 2475 2477 // Check for any CSS containing \ ( & } = or comments,
Note: See TracChangeset
for help on using the changeset viewer.