Changeset 54093 for trunk/src/wp-includes/kses.php
- Timestamp:
- 09/07/2022 03:22:09 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r54092 r54093 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.2232 2231 * 2233 2232 * @param string $css A string of CSS rules. … … 2469 2468 2470 2469 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 ); 2474 2472 // 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 ); 2476 2474 2477 2475 // Check for any CSS containing \ ( & } = or comments,
Note: See TracChangeset
for help on using the changeset viewer.