Skip to content

Commit

Permalink
noopener attributes for more external links
Browse files Browse the repository at this point in the history
  • Loading branch information
Cefan Rubin authored and vgonc committed Oct 8, 2024
1 parent e439173 commit 1c2c904
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion _includes/layouts/project.njk
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ layout: content
<h2 id="resources">Resources</h2>
<ul>
{% for res in other_resources -%}
<li><a href="{{ res[ 'link' ] }}">{{ res[ 'text' ] }}</a></li>
<li><a href="{{ res[ 'link' ] }}" rel="noopener">{{ res[ 'text' ] }}</a></li>
{% endfor -%}
</ul>
{% endif -%}
Expand Down
8 changes: 4 additions & 4 deletions _includes/layouts/publication.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ layout: content

<div class="publication_location">{{ location }}</div>
{% if doi %}
<a href="https://doi.org/{{ doi }}" target="_blank">view &#x2197;</a>
<a href="https://doi.org/{{ doi }}" target="_blank" rel="noopener">view &#x2197;</a>
{% elif url %}
<a href="{{ url }}" target="_blank">view &#x2197;</a>
<a href="{{ url }}" target="_blank" rel="noopener">view &#x2197;</a>
{% endif %}

{% if publications[ page.fileSlug ].local %}
&nbsp; &nbsp;<a href="https://files.research.cloudflare.com/publication/{{ page.fileSlug }}.pdf" target="_blank">download </a><br />
&nbsp; &nbsp;<a href="https://files.research.cloudflare.com/publication/{{ page.fileSlug }}.pdf" target="_blank" rel="noopener">download </a><br />
{% endif %}

<br />
Expand All @@ -37,7 +37,7 @@ layout: content
<h2>Artifacts</h2>
<ul>
{% for artifact in artifacts -%}
<li><a href="{{ artifact.url }}">{{ artifact.text }}</a></li>
<li><a href="{{ artifact.url }}" target="_blank" rel="noopener">{{ artifact.text }}</a></li>
{% endfor -%}
</ul>
{% endif -%}
Expand Down
2 changes: 1 addition & 1 deletion _includes/person_header.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</span>
{% endif %}
{% if profile.twitter and profile.status == 'current' %}
<a href="https://twitter.com/{{ profile.twitter }}" target="_blank"><img class="twitter" src="/img/twitter.svg" /></a>
<a href="https://twitter.com/{{ profile.twitter }}" target="_blank" rel="noopener"><img class="twitter" src="/img/twitter.svg" /></a>
{% endif %}
<!--<img style="height: 1.5rem; position: relative;" src="/img/cloud.svg" alt="orange cloud">-->
</span>
Expand Down
2 changes: 1 addition & 1 deletion _includes/related_blogposts.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

<ul>
{% for post in related_blogposts -%}
<li><a href="{{ post.link }}" target="_blank" nofollow>{{ post.heading }}</a></li>
<li><a href="{{ post.link }}" target="_blank" rel="noopener" nofollow>{{ post.heading }}</a></li>
{% endfor -%}
</ul>
4 changes: 2 additions & 2 deletions outreach/events/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ title: Upcoming Events
<div>
<h3><small>{{ event.date.getFullYear() + "-" + ( "0" + ( event.date.getMonth() + 1 ) ).slice( -2 ) + "-" + ( "0" + event.date.getDate() ).slice( -2 ) }}</small>
{% if event.data.link %}
<a href="{{ event.data.link }}">{{ event.data.title }}</a>
<a href="{{ event.data.link }}" target="_blank" rel="noopener">{{ event.data.title }}</a>
{% else %}
<a href="{{ event.url }}">{{ event.data.title }}</a>
<a href="{{ event.url }} target="_blank" rel="noopener">{{ event.data.title }}</a>
{% endif %}
</h3>
<p>{{ event.data.description }}</p>
Expand Down
4 changes: 2 additions & 2 deletions outreach/events/past.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ title: Past Events
<div>
<h3><small>{{ event.date.getFullYear() + "-" + ( "0" + ( event.date.getMonth() + 1 ) ).slice( -2 ) + "-" + ( "0" + event.date.getDate() ).slice( -2 ) }}</small>
{% if event.data.link %}
<a href="{{ event.data.link }}">{{ event.data.title }}</a>
<a href="{{ event.data.link }}" target="_blank" rel="noopener">{{ event.data.title }}</a>
{% else %}
<a href="{{ event.url }}">{{ event.data.title }}</a>
<a href="{{ event.url }}" target="_blank" rel="noopener">{{ event.data.title }}</a>
{% endif %}
</h3>
{% if event.data.description %}
Expand Down
6 changes: 3 additions & 3 deletions outreach/updates/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ title: Updates
<article class="content" id="content">

<h1>
Research Updates from the <a href="https://blog.cloudflare.com/">Cloudflare Blog</a>
<a href="https://blog.cloudflare.com/tag/research/rss/"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="25px" height="25px" id="RSSicon" viewBox="0 0 256 256" alt="RSS feed">
Research Updates from the <a href="https://blog.cloudflare.com/" rel="noopener">Cloudflare Blog</a>
<a href="https://blog.cloudflare.com/tag/research/rss/" rel="noopener"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="25px" height="25px" id="RSSicon" viewBox="0 0 256 256" alt="RSS feed">
<defs>
<linearGradient x1="0.085" y1="0.085" x2="0.915" y2="0.915" id="RSSg">
<stop offset="0.0" stop-color="#E3702D"/><stop offset="0.1071" stop-color="#EA7D31"/>
Expand All @@ -28,7 +28,7 @@ title: Updates
<div class="updates">
{% for blogpost in blogposts.ordered %}
<div>
<h3><small>{{ blogpost.date.slice( 0, 10 ) }}</small> <a href="{{ blogpost.link | replace( 'http:', 'https:' ) }}" target="_blank">{{ blogpost.heading }}</a></h3>
<h3><small>{{ blogpost.date.slice( 0, 10 ) }}</small> <a href="{{ blogpost.link | replace( 'http:', 'https:' ) }}" target="_blank" rel="noopener">{{ blogpost.heading }}</a></h3>
<p>{{ blogpost.text }}</p>
</div>
{% endfor %}
Expand Down
4 changes: 2 additions & 2 deletions resources/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ quick_references:

<div class="box">
{% for experiment in collections.experiment | reverse %}
<a href="{{ experiment.data.url }}" {% if 'http' in experiment.data.url %}target="_blank" nofollow{% endif %}>
<a href="{{ experiment.data.url }}" {% if 'http' in experiment.data.url %}target="_blank" rel="noopener" nofollow{% endif %}>
<h3>{{ experiment.data.title }}</h3>
<p>
{{ experiment.data.description }}
Expand All @@ -114,7 +114,7 @@ quick_references:

<div class="box">
{% for card in quick_references %}
<a class="reference" href="{{ card.url }}" target="_blank" nofollow>
<a class="reference" href="{{ card.url }}" target="_blank" rel="noopener" nofollow>
<h3>{{ card.title }}</h3>
<p>
{{ card.description }}
Expand Down

0 comments on commit 1c2c904

Please sign in to comment.