[wp-trac] [WordPress Trac] #55966: safecss_filter_attr() returns empty if containing min()
WordPress Trac
noreply at wordpress.org
Sat Jun 11 13:32:43 UTC 2022
#55966: safecss_filter_attr() returns empty if containing min()
------------------------------------------+---------------------
Reporter: uxl | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1
Component: Formatting | Version: 6.0
Severity: major | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses: css
------------------------------------------+---------------------
Changes (by SergeyBiryukov):
* keywords: => needs-patch needs-unit-tests
* component: General => Formatting
* milestone: Awaiting Review => 6.1
Old description:
> I have block themes that define layout ({{{contentSize}}} and
> {{{wideSize}}} in {{{theme.json}}}) using {{{min()}}}
>
> The issue is that {{{wp_get_layout_style()}}} returns nothing as
> {{{safecss_filter_attr()}}} does not recognize {{{min()}}} as valid CSS.
>
> This was not previously an issue because it used to be filtered using
> {{{wp_strip_all_tags()}}} as {{{gutenberg_get_layout_style()}}} still
> does when Gutenberg is active.
>
> However there is a TODO note in Gutenberg that it will switch to using
> {{{safecss_filter_attr}}} in future.
>
> I would ask that {{{min()}}} and any other missing valid CSS be allowed
> similar to how this was fixed to allow {{{calc()}}} and {{{var()}}}
>
> https://core.trac.wordpress.org/ticket/46197
> https://core.trac.wordpress.org/changeset/50923
New description:
I have block themes that define layout ({{{contentSize}}} and
{{{wideSize}}} in {{{theme.json}}}) using {{{min()}}}
The issue is that {{{wp_get_layout_style()}}} returns nothing as
{{{safecss_filter_attr()}}} does not recognize {{{min()}}} as valid CSS.
This was not previously an issue because it used to be filtered using
{{{wp_strip_all_tags()}}} as {{{gutenberg_get_layout_style()}}} still does
when Gutenberg is active.
However there is a TODO note in Gutenberg that it will switch to using
{{{safecss_filter_attr}}} in future.
I would ask that {{{min()}}} and any other missing valid CSS be allowed
similar to how this was fixed to allow {{{calc()}}} and {{{var()}}}
[50923] / #46197
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55966#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list