[wp-trac] [WordPress Trac] #55966: safecss_filter_attr() returns empty if containing min()
WordPress Trac
noreply at wordpress.org
Tue Sep 6 16:41:54 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: has-patch has-unit-tests changes- | Focuses: css
requested early |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:9 noisysocks]:
> could you please add `'css' =>` and `'expected' =>` to the `array()`s in
the tests? That way the code is a little more self-documenting.
>
> Current:
>
> {{{#!php
> // Allow min().
> array(
> 'width: min(50%, 400px)',
> 'width: min(50%, 400px)',
> ),
> }}}
>
> Better:
>
> {{{#!php
> // Allow min().
> array(
> 'css' => 'width: min(50%, 400px)',
> 'expected' => 'width: min(50%, 400px)',
> ),
> }}}
Good point, [attachment:"55966.3.diff"] refreshes the patch to address
that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55966#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list