Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#55356 closed defect (bug) (fixed)

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

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

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.


5 years ago
#1

  • Keywords has-patch added

safecss_filter_attr has been patched.

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

#2 @SergeyBiryukov
5 years ago

  • Description modified (diff)
  • Milestone Awaiting Review → 6.0

#3 @mukesh27
5 years ago

  • Keywords commit added

Hi there!

Thanks for the ticket and patch.

The patch looks good to me. Mark as commit.

#4 @davidbaumwald
5 years ago

  • Owner set to davidbaumwald
  • Status new → reviewing

#5 @davidbaumwald
5 years ago

  • Resolution → fixed
  • Status reviewing → 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.

​dream-encode commented on ​PR #2395:


5 years ago
#6

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.