Sanitize te user_names_with_roles [SCI-8007]

This commit is contained in:
sboursen-scinote 2023-03-10 09:46:45 +01:00
parent 45f1b3c97d
commit e9bdd218fa
2 changed files with 3 additions and 2 deletions

View file

@ -14,7 +14,8 @@ module ProjectsHelper
end
def user_names_with_roles(user_assignments)
user_assignments.map { |up| user_name_with_role(up) }.join('
')
names_with_roles = user_assignments.map { |up| user_name_with_role(up) }.join('
')
sanitize_input(names_with_roles)
end
def user_name_with_role(user_assignment)

View file

@ -6,7 +6,7 @@
<% more_users = protocol.user_assignments[3..-1].to_a %>
<% if more_users.any? %>
<span class="more-users" title="<%== user_names_with_roles(more_users) %>">
<span class="more-users" title="<%= user_names_with_roles(more_users) %>">
+<%= more_users.size %>
</span>
<% end %>