Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Correctly parameterize form ID for use in function link

Oliver Günthera5e78adcf9b0
diff --git a/app/views/roles/report.html.erb b/app/views/roles/report.html.erb
index 29b9c5d2bf9..75607527656 100644
--- a/app/views/roles/report.html.erb
+++ b/app/views/roles/report.html.erb
@@ -39,13 +39,14 @@ See COPYRIGHT and LICENSE files for more details.
<% group_permissions_by_module(@permissions).each do |mod, mod_permissions| %>
<% module_name = mod.blank? ? "form--" + I18n.t('attributes.project') : "form--" + l_or_humanize(mod, prefix: 'project_module_').gsub(' ','_') %>
- <fieldset class="form--fieldset -collapsible" id= "<%= module_name %>">
+ <% escaped_name = module_name.parameterize %>
+ <fieldset class="form--fieldset -collapsible" id= "<%= escaped_name %>">
<legend class="form--fieldset-legend" >
<%= mod.blank? ? I18n.t('attributes.project') : l_or_humanize(mod, prefix: 'project_module_') %>
</legend>
<div class="form--toolbar">
<span class="form--toolbar-item">
- (<%= check_all_links module_name %>)
+ (<%= check_all_links escaped_name %>)
</span>
</div>