Changeset 55944
- Timestamp:
- 06/20/2023 02:29:18 AM (15 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/kses.php
r55937 r55944 2280 2280 * @since 6.2.0 Added support for `aspect-ratio`, `position`, `top`, `right`, `bottom`, `left`, 2281 2281 * and `z-index` CSS properties. 2282 * @since 6.3.0 Extended support for `filter` to accept a URL .2282 * @since 6.3.0 Extended support for `filter` to accept a URL and added support for repeat(). 2283 2283 * 2284 2284 * @param string $css A string of CSS rules. … … 2564 2564 */ 2565 2565 $css_test_string = preg_replace( 2566 '/\b(?:var|calc|min|max|minmax|clamp )(\((?:[^()]|(?1))*\))/',2566 '/\b(?:var|calc|min|max|minmax|clamp|repeat)(\((?:[^()]|(?1))*\))/', 2567 2567 '', 2568 2568 $css_test_string -
trunk/tests/phpunit/tests/kses.php
r55822 r55944 938 938 * @ticket 55966 939 939 * @ticket 56122 940 * @ticket 58551 940 941 * @dataProvider data_safecss_filter_attr 941 942 * … … 1048 1049 'expected' => 'grid-template-rows: 40px 4em 40px;grid-auto-rows: min-content;grid-row-start: -1;grid-row-end: 3;grid-row-gap: 1em', 1049 1050 ), 1050 // `grid` does not yet support functions or`\`.1051 array( 1052 'css' => 'grid-template -columns: repeat(2, 50px 1fr);grid-template: 1em / 20% 20px 1fr',1051 // `grid` does not yet support `\`. 1052 array( 1053 'css' => 'grid-template: 1em / 20% 20px 1fr', 1053 1054 'expected' => '', 1054 1055 ), … … 1321 1322 'css' => 'filter: url( my-file.svg#svg-blur );', 1322 1323 'expected' => 'filter: url( my-file.svg#svg-blur )', 1324 ), 1325 // Support for `repeat` function. 1326 array( 1327 'css' => 'grid-template-columns: repeat(4, minmax(0, 1fr))', 1328 'expected' => 'grid-template-columns: repeat(4, minmax(0, 1fr))', 1329 ), 1330 array( 1331 'css' => 'grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr))', 1332 'expected' => 'grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr))', 1333 ), 1334 // Malformed repeat, no closing `)`. 1335 array( 1336 'css' => 'grid-template-columns: repeat(4, minmax(0, 1fr)', 1337 'expected' => '', 1338 ), 1339 // Malformed repeat, contains unsupported function. 1340 array( 1341 'css' => 'grid-template-columns: repeat(4, unsupported(0, 1fr)', 1342 'expected' => '', 1323 1343 ), 1324 1344 );
Note: See TracChangeset
for help on using the changeset viewer.