Skip to content
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

react/jsx-no-target-blank message is not strictly correct #265

Open
pdewouters opened this issue Jun 22, 2021 · 0 comments
Open

react/jsx-no-target-blank message is not strictly correct #265

pdewouters opened this issue Jun 22, 2021 · 0 comments
Labels

Comments

@pdewouters
Copy link
Contributor

The following wil trigger a warning: Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener

<a href="" target="_blank" rel="noreferrer">link text</a>

Screenshot 2021-06-22 at 09 07 36

However, checking the MDN docs, ( https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types/noreferrer ), we can see that noreferrer implies noopener unless I'm misunderstanding.

Additionally, if only noopener is required, then we only need target="_blank" as this will now imply it by default in major browsers

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

No branches or pull requests

2 participants