-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
[docs-infra] Remove dangerouslySetInnerHTML for ad description
#46936
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
Conversation
Netlify deploy previewhttps://deploy-preview-46936--material-ui.netlify.app/ Bundle size report
|
dangerouslySetInnerHTML for ad description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't expect regressions from those changes; it seems OK.
On the security part, this seems far-fetched, we grant all permissions to https://cdn.carbonads.com/carbon.js by loading this as a script, which uses .innerHTML to inject the description, so they already have to sanitize the ad description, so this should make no difference.
However, forcing strings enforces consistency in the ad layout, which seems like a positive UI change.
dangerouslySetInnerHTML for ad descriptiondangerouslySetInnerHTML for ad description
We're loading these ads from https://srv.buysellads.com/. I think this makes some difference, we halved the amount of ad domains that can inject code in our pages.
|
For context, |
Avoid injecting unsanitized html from third party ad networks.
Credit goes to @Gyde04, thank you for reporting!
Preview https://deploy-preview-46936--material-ui.netlify.app/material-ui/react-button/