diff --git a/app/controllers/direct_uploads_controller.rb b/app/controllers/direct_uploads_controller.rb
index d1d52eb4c..425c43200 100644
--- a/app/controllers/direct_uploads_controller.rb
+++ b/app/controllers/direct_uploads_controller.rb
@@ -17,7 +17,7 @@ class DirectUploadsController < ApplicationController
render json: { cached_attachment: @direct_upload.relation.cached_attachment,
filename: @direct_upload.relation.attachment.original_filename,
- destroy_link: render_destroy_upload_link(@direct_upload).html_safe,
+ destroy_link: render_destroy_upload_link(@direct_upload),
attachment_url: @direct_upload.relation.attachment.url }
else
@direct_upload.destroy_attachment
diff --git a/app/views/admin/budget_investments/_select_investment.html.erb b/app/views/admin/budget_investments/_select_investment.html.erb
index 793e05c7c..b293894b2 100644
--- a/app/views/admin/budget_investments/_select_investment.html.erb
+++ b/app/views/admin/budget_investments/_select_investment.html.erb
@@ -31,7 +31,7 @@
<% 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 %>
|
diff --git a/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb b/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb
index bae02cd64..e566ebd03 100644
--- a/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb
+++ b/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb
@@ -36,7 +36,7 @@
- <%= first_proposed_action.title %>
<% if first_proposed_action.short_description.present? %>
- <%= first_proposed_action.short_description.html_safe %>
+ <%= first_proposed_action.short_description %>
<% end %>
<% end %>
diff --git a/app/views/kaminari/_first_page.html.erb b/app/views/kaminari/_first_page.html.erb
index e8afb0431..a5335a30b 100644
--- a/app/views/kaminari/_first_page.html.erb
+++ b/app/views/kaminari/_first_page.html.erb
@@ -1,3 +1,3 @@
- <%= link_to t("views.pagination.first").html_safe, kaminari_path(url), :remote => remote %>
+ <%= link_to t("views.pagination.first"), kaminari_path(url), :remote => remote %>
diff --git a/app/views/kaminari/_last_page.html.erb b/app/views/kaminari/_last_page.html.erb
index 5a49bd7e2..697b3bd15 100644
--- a/app/views/kaminari/_last_page.html.erb
+++ b/app/views/kaminari/_last_page.html.erb
@@ -1,3 +1,3 @@
- <%= link_to t("views.pagination.last").html_safe, kaminari_path(url), :remote => remote %>
+ <%= link_to t("views.pagination.last"), kaminari_path(url), :remote => remote %>
diff --git a/app/views/kaminari/_next_page.html.erb b/app/views/kaminari/_next_page.html.erb
index 11c700900..366367031 100644
--- a/app/views/kaminari/_next_page.html.erb
+++ b/app/views/kaminari/_next_page.html.erb
@@ -1,3 +1,3 @@
diff --git a/app/views/kaminari/_prev_page.html.erb b/app/views/kaminari/_prev_page.html.erb
index aba1d9369..d0147ff5c 100644
--- a/app/views/kaminari/_prev_page.html.erb
+++ b/app/views/kaminari/_prev_page.html.erb
@@ -1,3 +1,3 @@
diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb
index 1337be64b..ebd7dc990 100644
--- a/app/views/layouts/_footer.html.erb
+++ b/app/views/layouts/_footer.html.erb
@@ -2,7 +2,7 @@
- <%= 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 %>
diff --git a/app/views/layouts/_notification_item.html.erb b/app/views/layouts/_notification_item.html.erb
index 7a21a3c38..c766f862a 100644
--- a/app/views/layouts/_notification_item.html.erb
+++ b/app/views/layouts/_notification_item.html.erb
@@ -10,11 +10,11 @@
">
+ count: current_user.notifications_count) %>">
<%= t("layouts.header.notification_item.new_notifications",
- count: current_user.notifications_count).html_safe %>
+ count: current_user.notifications_count) %>
<% else %>
document.body.remove()" }
+
+ scenario "valuators in admin investments index" do
+ hacker = create(:user, username: attack_code)
+ investment = create(:budget_investment, valuators: [create(:valuator, user: hacker)])
+
+ login_as(create(:administrator).user)
+ visit admin_budget_budget_investments_path(investment.budget)
+
+ expect(page.text).not_to be_empty
+ end
+end
|