In #28084 we added new color controls to style the icons and their background. The way this works is by using CSS Custom Properties attached to the block (post_content) such as the block style attribute looks like:
style="--wp--social-links--icon-color:#FFFFFF"
This is problematic for kses which maintains a list of allowed property names and --wp--social-links--icon-color is not one of them (see list). As a result, the color controls won't work for roles that don't have unfiltered_html capabilities.
Steps to reproduce:
- Use a WordPress 5.7 environment (latest from
wordpress-develop trunk or using the beta-tester plugin) without the Gutenberg plugin.
- Log in as an author role (or any other role without unfiltered_html capabilities).
- Go to the post editor and add a social links block.
- Select white as the icon color and orange as the background color.
- Publish and go to the front-end => note that the colors are not present. Inspect the DOM and see that the CSS variables used to set the colors are not attached to the DOM.
- Reload the editor => the block is invalidated.
In #28084 we added new color controls to style the icons and their background. The way this works is by using CSS Custom Properties attached to the block (
post_content) such as the blockstyleattribute looks like:style="--wp--social-links--icon-color:#FFFFFF"This is problematic for kses which maintains a list of allowed property names and
--wp--social-links--icon-coloris not one of them (see list). As a result, the color controls won't work for roles that don't have unfiltered_html capabilities.Steps to reproduce:
wordpress-developtrunk or using the beta-tester plugin) without the Gutenberg plugin.