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

Replace catastrophic regex with Sanitize to remove tags

Christophe Bliard43b30dc89a2b
diff --git a/modules/reporting/app/helpers/reporting_helper.rb b/modules/reporting/app/helpers/reporting_helper.rb
index e881ae54c76..b9a669cb6c8 100644
--- a/modules/reporting/app/helpers/reporting_helper.rb
+++ b/modules/reporting/app/helpers/reporting_helper.rb
@@ -142,7 +142,7 @@ module ReportingHelper
case key.to_sym
when :work_package_id, :tweek, :tmonth, :week then value.to_i
when :spent_on then value.to_date.mjd
- else h(field_representation_map(key, value).gsub(/<\/?[^>]*>/, ''))
+ else h(Sanitize.fragment(field_representation_map(key, value)))
end
end