Skip to content

noopener alone not allowed #3044

@mauro1855

Description

@mauro1855

Hi,

I've been reading the discussion surrounding noopener / noreferrer, including what was done in #2043.
However, I still find the behaviour strange.

Here is my link:
<a href="https://some-external-link.com" target="_blank" rel="noopener">Link</a>

I'm getting a warning:
Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener react/jsx-no-target-blank

The html spec link redirects me to noopener documentation, and yet it is still requiring me to add noreferrer. As far as I understand, the use or noreferrer or noopener removes the security risk, so the rule should not be triggered if one of them is present (no matter which). In this case, since I'm using noopener (thus removing the security risk), the warning should not be shown, imho.

Why don't I use noreferrer? I think it's important for websites to know where their traffic is coming from, so I don't intend on hiding the referrer, and I don't think you should either. The referrer information helps bloggers and independent content creators properly monitor the traffic arriving to their websites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions