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

Remove noopener on external link anchors #12546

Open
gergelypap opened this issue Jun 25, 2022 · 0 comments · May be fixed by #12547
Open

Remove noopener on external link anchors #12546

gergelypap opened this issue Jun 25, 2022 · 0 comments · May be fixed by #12547

Comments

@gergelypap
Copy link

gergelypap commented Jun 25, 2022

Problem

As of 2021, the spec have changed on how target="_blank" anchor elements use openers. The usage of rel="noreferrer" implies noopener as well by default. See the spec mentioning this: https://html.spec.whatwg.org/multipage/links.html#link-type-noreferrer

Solution

We should remove noopener on target="_blank" anchors, as there is no need to include it anymore. It can be tested on https://mathiasbynens.github.io/rel-noopener/

Additional context

The react/jsx-no-target-blank lint rule is fine with only including noreferrer as the value.

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

Successfully merging a pull request may close this issue.

1 participant