Button block with gradient background fails to validate on multisite #17938
Labels
[Block] Buttons
Affects the Buttons Block
[Feature] Multisite
Anything related to the specific experience of using a multisite
[Type] Bug
An existing feature does not function as intended
Describe the bug
Button blocks set with a gradient background are considered invalid blocks by the editor when loaded on a multisite WordPress install, due to the KSES filters registered on those environments.
The only difference between the content generated by the
save
function and the one retrieved from DB are the missing whitespaces on thestyle
attribute.Those whitespaces are removed by the
wp_kses_hair
function which is executed by the KSES filters triggered when saving the post. These filters are only registered when a user doesn't have theunfiltered_html
capability (which is the case for multisite regular admins).To reproduce
unfiltered_html
capability.Expected behavior
The button should remain valid.
The text was updated successfully, but these errors were encountered: