Remove unneeded html_safe and raw calls

There's no HTML in these texts, or it has already been escaped by Rails
`link_to` helper method.
This commit is contained in:
Javi Martín
2019-10-02 02:24:25 +02:00
parent 2c80c05372
commit 20ca6beb30
10 changed files with 25 additions and 10 deletions

View File

@@ -31,7 +31,7 @@
<td class="small" data-field="valuator">
<% valuators = [investment.assigned_valuation_groups, investment.assigned_valuators].compact %>
<% no_valuators_assigned = t("admin.budget_investments.index.no_valuators_assigned") %>
<%= raw valuators.present? ? valuators.join(", ") : no_valuators_assigned %>
<%= valuators.present? ? valuators.join(", ") : no_valuators_assigned %>
</td>
<td class="small" data-field="geozone">

View File

@@ -36,7 +36,7 @@
<ul>
<li><%= first_proposed_action.title %></li>
<% if first_proposed_action.short_description.present? %>
<p><%= first_proposed_action.short_description.html_safe %></p>
<p><%= first_proposed_action.short_description %></p>
<% end %>
</ul>
<% end %>

View File

@@ -1,3 +1,3 @@
<li>
<%= link_to t("views.pagination.first").html_safe, kaminari_path(url), :remote => remote %>
<%= link_to t("views.pagination.first"), kaminari_path(url), :remote => remote %>
</li>

View File

@@ -1,3 +1,3 @@
<li>
<%= link_to t("views.pagination.last").html_safe, kaminari_path(url), :remote => remote %>
<%= link_to t("views.pagination.last"), kaminari_path(url), :remote => remote %>
</li>

View File

@@ -1,3 +1,3 @@
<li class="pagination-next">
<%= link_to t("views.pagination.next").html_safe, kaminari_path(url), :rel => "next", :remote => remote %>
<%= link_to t("views.pagination.next"), kaminari_path(url), :rel => "next", :remote => remote %>
</li>

View File

@@ -1,3 +1,3 @@
<li class="pagination-previous">
<%= link_to t("views.pagination.previous").html_safe, kaminari_path(url), :rel => "prev", :remote => remote %>
<%= link_to t("views.pagination.previous"), kaminari_path(url), :rel => "prev", :remote => remote %>
</li>

View File

@@ -2,7 +2,7 @@
<div class="row">
<div class="small-12 large-4 column">
<h1 class="logo">
<%= link_to t("layouts.header.open_gov", open: "#{t("layouts.header.open")}").html_safe %>
<%= link_to t("layouts.header.open_gov", open: t("layouts.header.open")), root_path %>
</h1>
<p class="info">

View File

@@ -10,11 +10,11 @@
<span class="icon-circle" aria-hidden="true"></span>
<span class="icon-notification" aria-hidden="true"
title="<%= t("layouts.header.notification_item.new_notifications",
count: current_user.notifications_count).html_safe %>">
count: current_user.notifications_count) %>">
</span>
<span class="show-for-small-only">
<%= t("layouts.header.notification_item.new_notifications",
count: current_user.notifications_count).html_safe %>
count: current_user.notifications_count) %>
</span>
<% else %>
<span class="icon-no-notification" aria-hidden="true"