-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Dangerous property 'dangerouslySetInnerHTML' found #1142
Comments
@nikogu 为什么要这么写呢? 我发现了好几个 |
@chenshuai2144 需要展示特殊字符啊...这个是 warning 不是 error,就是开发者自己要注意,你如果用不到特殊字符,你就可以改成直接显示的方式。 https://github.com/ant-design/ant-design-pro/blob/master/src/routes/Dashboard/Analysis.js#L255 |
组件里最好不要用 dangerouslySetInnerHTML,有安全风险。 |
倒是从来没遇到过什么安全问题,执行标签如 抽离出来,交给用户自己决定好了。 |
* fixed: ant-design#1142 * fix typo * fix typo * fix typo * add missing fix
src/components/Charts/ChartCard/index.js
14:48 warning Dangerous property 'dangerouslySetInnerHTML' found react/no-danger
The text was updated successfully, but these errors were encountered: