Skip to content

Commit 5cf46ca

Browse files
Luccasoliljharb
authored andcommitted
[Docs] jsx-no-target-blank: Fix link to link-type-noreferrer
1 parent 23121e0 commit 5cf46ca

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
3535
* [readme] Remove dead david-dm badge ([#3262][] @ddzz)
3636
* [Refactor] [`jsx-closing-bracket-location`], [`jsx-no-bind`]: fix eslint issues ([#3351][] @caroline223)
3737
* [Tests] [`function-component-definition`]: add passing test cases ([#3355][] @TildaDares)
38+
* [Docs] [`jsx-no-target-blank`]: Fix link to link-type-noreferrer ([#3319][] @Luccasoli)
3839

3940
[#3355]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3355
4041
[#3353]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3353
@@ -53,6 +54,7 @@ This change log adheres to standards from [Keep a CHANGELOG](https://keepachange
5354
[#3326]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3326
5455
[#3321]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3321
5556
[#3320]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3320
57+
[#3319]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3319
5658
[#3317]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3317
5759
[#3316]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3316
5860
[#3315]: https://github.com/jsx-eslint/eslint-plugin-react/pull/3315

docs/rules/jsx-no-target-blank.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prevent usage of unsafe `target='_blank'` (react/jsx-no-target-blank)
22

3-
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))
3+
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)
44
This rules requires that you accompany `target='_blank'` attributes with `rel='noreferrer'`.
55

66
## Rule Details

0 commit comments

Comments
 (0)