-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social Links colors not working for roles without unfiltered_html capabilities #29297
Comments
cc @noisysocks so you're aware of this (I've already added it to the 5.7 must-haves). Do I need to create a core patch as well? cc @aaronrobertshaw @mkaz @jasmussen for ideas. One option would be to hook into the An alternative is to use the block context to pass the values down to the inner blocks. Finally, we always have the option to revert the original PR. |
Unfortunately, this is something we may have to resort to if we can't address the filtering issue. @aaronrobertshaw, can you lead the fix? |
I've given this more thought and I've grown reservations against the
Given this, I'm inclined to think that we should refactor to use the block context approach or revert that PR. |
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 blockstyle
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:
wordpress-develop
trunk or using the beta-tester plugin) without the Gutenberg plugin.The text was updated successfully, but these errors were encountered: