Skip to content
Permalink
Browse files

tpl: Add `rel="noopener"` for external links

This could be a security and performance issue.

See https://developers.google.com/web/tools/lighthouse/audits/noopener
  • Loading branch information...
XhmikosR authored and bep committed Sep 21, 2019
1 parent 2b1814e commit 34dc06b032741abac342d7a2a77510ded9b72ae8

Some generated files are not rendered by default. Learn more.

@@ -15,7 +15,7 @@
<div class="card-header">
<a href="{{ $item.author_url | safeURL }}" class="card-link">{{ $item.author_name }}</a>
</div>
<a href="{{ $mediaURL }}" target="_blank"><img class="card-img-top img-fluid" src="{{ $item.thumbnail_url }}" width="{{ $item.thumbnail_width }}" height="{{ $item.thumbnail_height }}" alt="Instagram Image"></a>
<a href="{{ $mediaURL }}" rel="noopener" target="_blank"><img class="card-img-top img-fluid" src="{{ $item.thumbnail_url }}" width="{{ $item.thumbnail_width }}" height="{{ $item.thumbnail_height }}" alt="Instagram Image"></a>
<div class="card-body">
{{ if not $hideCaption }}<p class="card-text"><a href="{{ $item.author_url | safeURL }}" class="card-link">{{ $item.author_name }}</a> {{ $item.title}}</p>{{ end }}
<a href="{{ $item.author_url | safeURL }}" class="card-link">View More on Instagram</a>
@@ -10,7 +10,7 @@
{{ $secondClass := "s_video_simple" }}
<div class="{{ $secondClass }} {{ $class }}">
{{- with $item }}
<a href="{{ .provider_url }}{{ .video_id }}" target="_blank">
<a href="{{ .provider_url }}{{ .video_id }}" rel="noopener" target="_blank">
{{ $thumb := .thumbnail_url }}
{{ $original := $thumb | replaceRE "(_.*\\.)" "." }}
<img src="{{ $thumb }}" srcset="{{ $thumb }} 1x, {{ $original }} 2x" alt="{{ .title }}">

0 comments on commit 34dc06b

Please sign in to comment.
You can’t perform that action at this time.