Skip to content

Commit

Permalink
[Docs] jsx-no-target-blank: Fix link to link-type-noreferrer
Browse files Browse the repository at this point in the history
  • Loading branch information
Luccasoli authored and ljharb committed Jul 4, 2022
1 parent 23121e0 commit 5cf46ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -35,6 +35,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
* [readme] Remove dead david-dm badge ([#3262][] @ddzz)
* [Refactor] [`jsx-closing-bracket-location`], [`jsx-no-bind`]: fix eslint issues ([#3351][] @caroline223)
* [Tests] [`function-component-definition`]: add passing test cases ([#3355][] @TildaDares)
* [Docs] [`jsx-no-target-blank`]: Fix link to link-type-noreferrer ([#3319][] @Luccasoli)

[#3355]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3355
[#3353]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3353
Expand All @@ -53,6 +54,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
[#3326]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3326
[#3321]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3321
[#3320]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3320
[#3319]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3319
[#3317]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3317
[#3316]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3316
[#3315]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3315
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/jsx-no-target-blank.md
@@ -1,6 +1,6 @@
# Prevent usage of unsafe `target='_blank'` (react/jsx-no-target-blank)

When creating a JSX element that has an `a` tag, it is often desired to have the link open in a new tab using the `target='_blank'` attribute. Using this attribute unaccompanied by `rel='noreferrer'`, however, is a severe security vulnerability ([see here for more details](https://html.spec.whatwg.org/multipage/links.html#link-type-noopener))
When creating a JSX element that has an `a` tag, it is often desired to have the link open in a new tab using the `target='_blank'` attribute. Using this attribute unaccompanied by `rel='noreferrer'`, however, is a severe security vulnerability (see [noreferrer docs](https://html.spec.whatwg.org/multipage/links.html#link-type-noreferrer) and [noopener docs](https://html.spec.whatwg.org/multipage/links.html#link-type-noopener) for more details)
This rules requires that you accompany `target='_blank'` attributes with `rel='noreferrer'`.

## Rule Details
Expand Down

0 comments on commit 5cf46ca

Please sign in to comment.