Formatting: Use `safecss_filter_attr` in `wp_get_layout_style()`.
Previously, `safecss_filter_attr` did not allow for `calc` and `var` in parsed CSS. Because of this, `wp_strip_all_tags` was used in `wp_get_layout_style` to allow for the use of these CSS functions to account for responsive widths. [50923] added support for both of these CSS functions in KSES, so `safecss_filter_attr` can now be used in `wp_get_layout_style` as originally intended. Follow-up to [52069]. Props grapplerulrich. Fixes #55356. Built from https://develop.svn.wordpress.org/trunk@52924 git-svn-id: http://core.svn.wordpress.org/trunk@52513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
29574d03bd
commit
3172eac11b
|
@ -54,9 +54,8 @@ function wp_get_layout_style( $selector, $layout, $has_block_gap_support = false
|
|||
$wide_max_width_value = $wide_size ? $wide_size : $content_size;
|
||||
|
||||
// Make sure there is a single CSS rule, and all tags are stripped for security.
|
||||
// TODO: Use `safecss_filter_attr` instead - once https://core.trac.wordpress.org/ticket/46197 is patched.
|
||||
$all_max_width_value = wp_strip_all_tags( explode( ';', $all_max_width_value )[0] );
|
||||
$wide_max_width_value = wp_strip_all_tags( explode( ';', $wide_max_width_value )[0] );
|
||||
$all_max_width_value = safecss_filter_attr( explode( ';', $all_max_width_value )[0] );
|
||||
$wide_max_width_value = safecss_filter_attr( explode( ';', $wide_max_width_value )[0] );
|
||||
|
||||
$style = '';
|
||||
if ( $content_size || $wide_size ) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-alpha-52923';
|
||||
$wp_version = '6.0-alpha-52924';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue