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

Discussion: Rails/LinkToBlank #30

Closed
foobear opened this issue Nov 29, 2021 · 1 comment
Closed

Discussion: Rails/LinkToBlank #30

foobear opened this issue Nov 29, 2021 · 1 comment
Assignees

Comments

@foobear
Copy link
Member

foobear commented Nov 29, 2021

Rubocop expects a rel="noopener" for links with target="_blank" because of legacy security reasons.

app/example.rb:12:34: C: [Correctable] Rails/LinkToBlank: Specify a :rel option containing noopener.
    link_to(text, url, target: '_blank')
                       ^^^^^^^^^^^^^^^^

This is only relevant for IE11, since the HTML spec was changed and all modern browsers have adjusted.

I vote for disabling this cop in our default config, since we by default do not support IE11.

👍 Disable cop
👎 Keep cop enabled

@codener codener self-assigned this Dec 7, 2021
@codener
Copy link
Member

codener commented Jan 4, 2022

Released as 7.2.0.

@codener codener closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants