-
Notifications
You must be signed in to change notification settings - Fork 74
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
Update CSS sanitization safelist to support variables #574
Comments
Comment by slackbot: This ticket was mentioned in Slack in #meta-wordcamp by coreymckrill. View the logs. |
Comment by slackbot: This ticket was mentioned in Slack in #meta-wordcamp by ryelle. View the logs. |
Possible Jetpack fix: Automattic/jetpack#20129 |
The Jetpack issue says the problem was fixed, so this is worth looking into again. |
It doesn't look like that fixed it, so I think we need to track Automattic/jetpack#19669. |
When support for custom properties is added (by us or upstream in Jetpack), we need to make sure that the values are still subject to sanitization. At that time we'll probably need to change the expected value to something like `--foo: ;`, but having some kind of test in place now will at least make it obvious if the JS makes it into the sanitized output. See #574
Imported from https://meta.trac.wordpress.org/ticket/4108
Created by @iandunn:
Most browsers support CSS variables now, but they're stripped out by the Jetpack validation process, or the Remote CSS sanitization process.
https://wordpress.slack.com/archives/C08M59V3P/p1548543160179600
Either way, it's probably just because the syntax is new, and the safelist needs to be updated to support it.
mu-plugins/jetpack-tweaks/css-sanitization.php
, or both)sanitize_urls_in_css_properties()
, let me know before writing a patch since I have some notes about a potential bug there.The text was updated successfully, but these errors were encountered: