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

Create label method and do not call html_safe on the label.

Dombi Attilad288c84f4518
diff --git a/app/forms/projects/life_cycles/form.rb b/app/forms/projects/life_cycles/form.rb
index b678bf93468..0d6d800f829 100644
--- a/app/forms/projects/life_cycles/form.rb
+++ b/app/forms/projects/life_cycles/form.rb
@@ -50,7 +50,7 @@ module Projects::LifeCycles
def base_input_attributes
{
- label: "#{icon} #{text}".html_safe, # rubocop:disable Rails/OutputSafety
+ label:,
leading_visual: { icon: :calendar },
datepicker_options: {
inDialog: ProjectLifeCycles::Sections::EditDialogComponent::DIALOG_ID,
@@ -84,8 +84,8 @@ module Projects::LifeCycles
form.range_date_picker **base_input_attributes, **input_attributes
end
- def text
- model.name
+ def label
+ helpers.safe_join([icon, " ", model.name])
end
def icon