Make WordPress Core

Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#55356 closed defect (bug) (fixed)

Use safecss_filter_attr() instead of wp_strip_all_tags() in wp_get_layout_style()

Reported by: grapplerulrich's profile grapplerulrich Owned by: davidbaumwald's profile davidbaumwald
Milestone: 6.0 Priority: normal
Severity: normal Version: 5.9
Component: Formatting Keywords: has-patch commit
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Now that #46197 has been patched, safecss_filter_attr() can be used instead of wp_strip_all_tags().

Introduced in Gutenberg#33359.

https://github.com/WordPress/WordPress/blob/5.9-branch/wp-includes/block-supports/layout.php#L57

Change History (6)

This ticket was mentioned in PR #2395 on WordPress/wordpress-develop by grappler.


7 months ago

  • Keywords has-patch added

safecss_filter_attr has been patched.

Trac ticket: https://core.trac.wordpress.org/ticket/55356

#2 @SergeyBiryukov
7 months ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to 6.0

#3 @mukesh27
7 months ago

  • Keywords commit added

Hi there!

Thanks for the ticket and patch.

The patch looks good to me. Mark as commit.

#4 @davidbaumwald
7 months ago

  • Owner set to davidbaumwald
  • Status changed from new to reviewing

#5 @davidbaumwald
7 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 52924:

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.

#6 @prbot
7 months ago

dream-encode commented on PR #2395:

Thanks for the PR! This was merged into Core in https://core.trac.wordpress.org/changeset/52924.

Note: See TracTickets for help on using tickets.