Content-Length: 288094 | pFad | https://redirect.github.com/jsx-eslint/eslint-plugin-react/pull/138

B2 Prevent usage of dangerous JSX properties (no-danger) by scothis · Pull Request #138 · jsx-eslint/eslint-plugin-react · GitHub
Skip to content

Prevent usage of dangerous JSX properties (no-danger) #138

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

Merged
merged 1 commit into from
Jul 7, 2015

Conversation

scothis
Copy link
Contributor

@scothis scothis commented Jul 1, 2015

Dangerous properties in React are those whose behavior is known to be a
common source of application vulnerabilities. The properties names
clearly indicate they are dangerous and should be avoided unless great
care is taken.

See https://facebook.github.io/react/tips/dangerously-set-inner-html.html

The following patterns are considered warnings:

var Hello = <div dangerouslySetInnerHTML={{ __html: "Hello World" }}></div>;

The following patterns are not considered warnings:

var Hello = <div>Hello World</div>;

Dangerous properties in React are those whose behavior is known to be a
common source of application vulnerabilities. The properties names
clearly indicate they are dangerous and should be avoided unless great
care is taken.

See https://facebook.github.io/react/tips/dangerously-set-inner-html.html

The following patterns are considered warnings:

    var Hello = <div dangerouslySetInnerHTML={{ __html: "Hello World" }}></div>;

The following patterns are not considered warnings:

    var Hello = <div>Hello World</div>;
@tmcw
Copy link
Contributor

tmcw commented Jul 7, 2015

@yannickcr any work needed to get this ready to merge?

@yannickcr yannickcr merged commit 6104472 into jsx-eslint:master Jul 7, 2015
@yannickcr
Copy link
Member

@scothis Very useful rule. Thanks!

@tmcw Sorry for the delay, I was pretty busy last days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://redirect.github.com/jsx-eslint/eslint-plugin-react/pull/138

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy