[wp-trac] [WordPress Trac] #57322: Twenty Twenty-Three: Gradients clear upon saving when KSES filters are active
WordPress Trac
noreply at wordpress.org
Tue Dec 13 13:49:02 UTC 2022
#57322: Twenty Twenty-Three: Gradients clear upon saving when KSES filters are
active
---------------------------+-----------------------------
Reporter: mmtr86 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bundled Theme | Version:
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
The Twenty Twenty-Three theme has some style variations that include a
background gradient such as Pilgrimage or Sherbet.
When the KSES filters (*) are active, the background gradient gets cleared
because the CSS value doesn't match
[[https://core.trac.wordpress.org/browser/trunk/src/wp-
includes/kses.php?rev=54933#L2533|this regex]] (see
https://regex101.com/r/awcZif/1).
(*) These filters are only registered when a user doesn't have the
`unfiltered_html` capability (which is the case for
[[https://core.trac.wordpress.org/browser/tags/6.1/src/wp-
includes/capabilities.php?marks=591,592#L591|multisite regular admins]]),
but can be manually enabled with `add_action( 'init', 'kses_init_filters'
)`.
----
**Steps to reproduce**
- Enable the KSES filters with `add_action( 'init', 'kses_init_filters'
);`
- Activate the Twenty Twenty-Three theme
- Go to Appearance > Editor
- Open the Styles sidebar
- Click on "Browse styles"
- Choose the Pilgrimage or Sherbet variation
- See the background gradient applied in the preview (dotted background
for Pilgrimage, rainbow gradient for Sherbet)
- Save the changes
- ⚠️ Note how the gradient disappears
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57322>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list