[go: nahoru, domu]

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

Detect hrefs that use target="_blank" without noopener #176

Open
Sfshaza opened this issue Nov 30, 2016 · 9 comments · Fixed by #2279
Open

Detect hrefs that use target="_blank" without noopener #176

Sfshaza opened this issue Nov 30, 2016 · 9 comments · Fixed by #2279
Labels
e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.link Adds, changes, or removes a link to a page infra.structure Relates to the tools that create dart.dev p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. st.triage.ltw Indicates Lead Tech Writer has triaged

Comments

@Sfshaza
Copy link
Sfshaza commented Nov 30, 2016

For performance and security reasons:
https://jakearchibald.com/2016/performance-benefits-of-rel-noopener/

We need a macro for this site and for webdev.

I found 86 instances on www.

@Sfshaza
Copy link
Author
Sfshaza commented Nov 30, 2016

Same issue on webdev: https://github.com/dart-lang/site-webdev/issues/154

@Sfshaza
Copy link
Author
Sfshaza commented Nov 30, 2016

(I had added the file in the original via drag/drop but didn't notice that it required a file extension. So adding the file again.)

out2.txt

@Sfshaza Sfshaza added the infra.structure Relates to the tools that create dart.dev label Jul 10, 2017
@kwalrath
Copy link
Contributor
kwalrath commented Jan 30, 2019

As of 2020/2/14, we still have up to 44 instances on dart.dev:

$ fgrep -R _blank src | grep target | wc -l
      76
$ fgrep -R _blank src | grep noopener | wc -l 
      32

OLD:

$ fgrep -R _blank src | grep target | wc -l
      49
$ fgrep -R _blank src | grep noopener | wc -l
       5

So up to 44 instances, but many of those are to the same site or to dartlang.org sites, and I'm not sure noopener matters for those.

@kwalrath kwalrath added p1-high Major but not urgent concern: Resolve in months. Update each month. e0-minutes Can complete in < 60 minutes of normal, not dedicated, work e1-hours Can complete in < 8 hours of normal, not dedicated, work labels Jan 30, 2019
@chalin
Copy link
Contributor
chalin commented Jan 30, 2019

I think that the best solution would be to have a Jekyll plugin to handle this. (The same plugin would be useful to address issues with punctuation and the "external link" icon.)

@kwalrath
Copy link
Contributor

I think that 'issues with punctuation and the "external link" icon' refers to the fact that we have to include the punctuation inside the link in order for the external link icon not to move the punctuation so far to the right that it looks weird. So we end up with a lot of, say, [link text.][link text], when we'd rather have [linktext][]..

Is that right, @chalin? Did you have a specific solution in mind for that?

@chalin
Copy link
Contributor
chalin commented Jan 30, 2019

Yes, that's it.

Did you have a specific solution in mind for that?

A Jekyll plugin.

@kwalrath
Copy link
Contributor

Related: #1058

@kwalrath kwalrath self-assigned this Feb 14, 2020
@kwalrath
Copy link
Contributor

I'm just going to apply this fix by hand.

kwalrath added a commit that referenced this issue Feb 19, 2020
...and sometimes just delete the _blank.

Contributes to #176.
@kwalrath
Copy link
Contributor

Perhaps we should have a test for _blanks without noopener?

@kwalrath kwalrath reopened this Feb 19, 2020
@kwalrath kwalrath added p2-medium Necessary but not urgent concern. Resolve when possible. and removed e0-minutes Can complete in < 60 minutes of normal, not dedicated, work p1-high Major but not urgent concern: Resolve in months. Update each month. labels Feb 19, 2020
@kwalrath kwalrath changed the title Fix hrefs that use target="_blank" Detect hrefs that use target="_blank" without noopener Feb 19, 2020
@parlough parlough added the st.triage.ltw Indicates Lead Tech Writer has triaged label May 22, 2023
@parlough parlough added fix.link Adds, changes, or removes a link to a page p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. and removed p2-medium Necessary but not urgent concern. Resolve when possible. labels Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e1-hours Can complete in < 8 hours of normal, not dedicated, work fix.link Adds, changes, or removes a link to a page infra.structure Relates to the tools that create dart.dev p3-low Valid but not urgent concern. Resolve when possible. Encourage upvote to surface. st.triage.ltw Indicates Lead Tech Writer has triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants