[wp-trac] [WordPress Trac] #55962: Upgrade `sanitize_hex_color()` to CSS Color Level 4
WordPress Trac
noreply at wordpress.org
Sun Jun 12 10:30:08 UTC 2022
#55962: Upgrade `sanitize_hex_color()` to CSS Color Level 4
-------------------------------------------------+-------------------------
Reporter: anrghg | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Future
| Release
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: needs-patch needs-unit-tests dev- | Focuses: css
feedback |
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:4 costdev]:
> What if we changed the signature of `sanitize_hex_color()` to include an
optional `$maybe_alpha` argument that defaults to `false`? That way,
`$maybe_alpha` is only enabled by intent, and this should protect BC.
I think that makes sense.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55962#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list