1
0
Fork 0

Add rel="noopener noreferrer"

to links with `target="_blank"`
This commit is contained in:
Alex Kotov 2020-05-29 13:20:53 +05:00
parent 9c7f695790
commit 672607585e
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 8 additions and 2 deletions

View file

@ -26,7 +26,10 @@
<% if contact.link.nil? %>
<%= truncate contact.value %>
<% else %>
<%= link_to truncate(contact.value), contact.link, target: :_blank %>
<%= link_to truncate(contact.value),
contact.link,
target: :_blank,
rel: 'noopener noreferrer' %>
<i class="fas fa-external-link-alt fa-xs text-muted"></i>
<% end %>
</td>

View file

@ -18,7 +18,10 @@
<% if contact.link.nil? %>
<%= truncate contact.value %>
<% else %>
<%= link_to truncate(contact.value), contact.link, target: :_blank %>
<%= link_to truncate(contact.value),
contact.link,
target: :_blank,
rel: 'noopener noreferrer' %>
<i class="fas fa-external-link-alt fa-xs text-muted"></i>
<% end %>
</td>