Open custom dashboard links in the same window
We were opening these links in a new tab/window because we assume they were external links. But, on the one hand, we don't even know whether these links are external, since they could also point to URLs from our site. And, on the other hand, opening external links in new windows results in usability issues as well [1, 2]. On top of that, old browsers have security issues when opening links in new tabs unless we add `rel="noopener"` [3], and we aren't doing so. [1] https://www.nngroup.com/articles/new-browser-windows-and-tabs [2] https://css-tricks.com/use-target_blank [3] https://mathiasbynens.github.io/rel-noopener/
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<% end %>
|
||||
|
||||
<% proposed_action.links.each do |link| %>
|
||||
<p><%= link_to link.label, link.url, target: "_blank" %></p>
|
||||
<p><%= link_to link.label, link.url %></p>
|
||||
<% end %>
|
||||
|
||||
<% proposed_action.documents.each do |document| %>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="margin-top">
|
||||
<h4><%= t("dashboard.new_request.links") %></h4>
|
||||
<% dashboard_action.links.each do |link| %>
|
||||
<p><%= link_to link.label, link.url, target: "_blank" %></p>
|
||||
<p><%= link_to link.label, link.url %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<% if Setting["proposals.poll_link"].present? %>
|
||||
<h4><%= t("dashboard.polls.index.links") %></h4>
|
||||
<%= link_to t("dashboard.polls.index.additiontal_information"),
|
||||
Setting["proposals.poll_link"], target: "_blank" %>
|
||||
Setting["proposals.poll_link"] %>
|
||||
<% end %>
|
||||
|
||||
<p><strong><%= t("dashboard.polls.index.count", count: @polls.count) %></strong></p>
|
||||
|
||||
Reference in New Issue
Block a user