#42729 closed enhancement (fixed)
Permit use of 'text-transform' in safecss_filter_attr()
Reported by: | danielbachhuber | Owned by: | juiiee8487 |
---|---|---|---|
Milestone: | 5.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
As a WordPress user, I'd expect that whitelisting use of the style
attribute for <span>
elements would permit use of text-transform:lowercase;
within the attribute.
However, doing so also requires filtering safe_style_css
. Given text-transform
is a text formatting property like font-style
and text-decoration
, it makes sense to also include it in safecss_filter_attr()
's default property set.
Attachments (2)
Change History (13)
#2
@
7 years ago
- Keywords has-patch added; needs-patch removed
I have created patch 42729.diff to whitelist text-transform CSS property.
#3
@
7 years ago
- Owner set to juiiee8487
- Status changed from new to assigned
Hi @juiiee8487, thanks for the patch! I've assigned this good-first-bug
ticket to you to mark it as "claimed" and somebody should be along to review your patch and give you some feedback on next steps. Sorry for the delay in response.
#5
@
7 years ago
- Keywords has-unit-tests added; needs-unit-tests removed
The patch in 42729.diff looks good.
There are currently no explicit tests for the safecss_filter_attr()
function.
The patch in 42729.2.diff
- adds
@since
in the docblock of thesafecss_filter_attr()
function. - adds tests for the
safecss_filter_attr()
function with a data provider.
There's a suggested patch by @joehoyle in #24157 for tests, that we could also consider.
But it looks like that patch is blocked by the discussion of allowing parentheses.
#8
@
6 years ago
- Keywords good-first-bug removed
- Resolution fixed deleted
- Status changed from closed to reopened
[42880] should be merged into 5.0. @since
needs updating.
I have created patch to whitelist text-transform CSS property.