Jetpack: Add rel="noopener" to links with target="_blank"

Created on 8 Nov 2017  路  11Comments  路  Source: Automattic/jetpack

Steps to reproduce the issue

Check website with Google Lighthouse

What I expected

Best practice compliant links

What happened instead

External links opened in new tab without the rel="noopener" attribute

General Good For Community [Pri] Low [Type] Enhancement [Type] Good First Bug

Most helpful comment

I've submitted the 5 PRs as referenced above.

All 11 comments

I assume this would apply to Core. I did a quick search and found a handful that would need to be updated there as well. While there are some places where "noopener" and "noreferrer" are used - it seems to be intermittent.

I saw that the above PR was rejected because it was too large. Was it ever split?

As suggested by @oskosk in PR #8401

I propose breaking up the PRs into the following:

Total: 121 entries, 53 files
i.) The entries are for files in commit d43fbe4d52b52a92459e60f4371ec5659b16a459 as of May 22nd, 2018.
ii.) The entries correspond to text target="_blank" and target : '_blank'
iii.) The text target : '_blank' is only applicable in one file modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js (part of P4)

P1: modules/*.* => 16 entries, 9 files
P2: modules/custom-post-types/ modules/shortcodes/ => 26 entries, 11 files
P3: modules/widgets/ => 18 entries, 13 files

P4: => 49 entries, 17 files
include: .modules/
exclude: the above directories

P5: tests/ tools/ => 12 entries, 3 files

OK, thanks @stevenlin-x . I will work on splitting out those changes and put together some new PRs based on the @oskosk 's recommendation. Did you mean these commits?

It looks like some of the files on the original commit have already been corrected in various other PRs.

@Dec0y-jb

I got all 5 handled. Let me take on this.

Please close your just submitted PRs.

@stevenlin-x

I was just about to submit my p3. Are you all set? I'm almost finished :)

Yes, and also the format. Thank you.

@stevenlin-x

I closed the 2 PRs.

I've submitted the 5 PRs as referenced above.

Reopening as only 1 of 5 PRs were merged.

Was this page helpful?
0 / 5 - 0 ratings