Skip to content

Commit 965634d

Browse files
committed
[Docs] jsx-no-target-blank: clarify allowReferrer usage details
1 parent 4cd5543 commit 965634d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ This rule aims to prevent user generated link hrefs and form actions from creati
2020
...
2121
```
2222

23-
* `allowReferrer`: optional boolean. If `true` does not require `noreferrer`. Defaults to `false`.
24-
* `enabled`: for enabling the rule. 0=off, 1=warn, 2=error. Defaults to 0.
23+
* `allowReferrer`: optional boolean. If `true` does not require `noreferrer` (i. e. `noopener` alone is enough, this leaves IE vulnerable). Defaults to `false`.
24+
* `enabled`: for enabling the rule.
2525
* `enforceDynamicLinks`: optional string, 'always' or 'never'
2626
* `warnOnSpreadAttributes`: optional boolean. Defaults to `false`.
2727
* `enforceDynamicLinks` - enforce: optional string, 'always' or 'never'
@@ -125,6 +125,8 @@ This rule supports the ability to use custom components for forms. To enable thi
125125

126126
For links to a trusted host (e.g. internal links to your own site, or links to a another host you control, where you can be certain this security vulnerability does not exist), you may want to keep the HTTP Referer header for analytics purposes.
127127

128+
If you do not support Internet Explorer (any version), Chrome < 49, Opera < 36, Firefox < 52, desktop Safari < 10.1 or iOS Safari < 10.3, you may set `allowReferrer` to `true`, keep the HTTP Referer header and only add `rel="noopener"` to your links.
129+
128130
## When Not To Use It
129131

130132
If you do not have any external links or forms, you can disable this rule.

0 commit comments

Comments
 (0)