Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Fix #571: Avoid redundant rel values in react-anchor-blank-noopener #574

Merged
merged 7 commits into from
Oct 25, 2018
Merged

Fix #571: Avoid redundant rel values in react-anchor-blank-noopener #574

merged 7 commits into from
Oct 25, 2018

Conversation

esuau
Copy link
Contributor

@esuau esuau commented Oct 23, 2018

Problem

Fixes #571
The rule react-anchor-blank-noopener was designed to avoid security vulnerabilities by the use of rel="noopener noreferrer" in anchor tags containing target="_blank". It appears that rel="noreferrer" implies rel="noopener".

Solution

I removed the obligation to use both noopener and noreferrer when target="_blank" is used, and only kept the rule to add rel="noreferrer".

@msftclas
Copy link

msftclas commented Oct 23, 2018

CLA assistant check
All CLA requirements met.

@JoshuaKGoldberg
Copy link

Hi @esuau, thanks for sending this! Per discussion in the linked issue, it's unclear which browsers support the better behavior of inferring proper tags. We'll want to have a rule option to toggle this behavior.

I'll leave this PR open for a bit in case you have time to add that option in. If not, no worries!

@esuau
Copy link
Contributor Author

esuau commented Oct 23, 2018

Sure, I'll try to work on this.

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like my huge PR for removing redundant comments merged in improperly to your PR branch. Sorry about that! I'll wait to review until the changes are clean again.

@esuau
Copy link
Contributor Author

esuau commented Oct 24, 2018

Hello. Merge was clean actually. I just did a rebase on your master branch. 😊

Copy link

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 🎉

@JoshuaKGoldberg JoshuaKGoldberg merged commit 9180e32 into microsoft:master Oct 25, 2018
@JoshuaKGoldberg JoshuaKGoldberg added this to the 6.0.0-beta0 milestone Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants