fix(label): don't html_safe user label from bdd

This commit is contained in:
Colin Darie 2024-10-16 11:39:19 +02:00 committed by Lisa Durand
parent e723c9e365
commit fd38288cf8
No known key found for this signature in database
GPG key ID: 0DF91F2CA1E8B816

View file

@ -120,7 +120,9 @@ module DossierHelper
def tags_label(tags) def tags_label(tags)
if tags.count > 1 if tags.count > 1
tag.ul(tags.map { tag.li(tag_label(_1[1], _1[2])) }.join.html_safe, class: 'fr-tags-group') tag.ul(class: 'fr-tags-group') do
safe_join(tags.map { |t| tag.li(tag_label(t[1], t[2])) })
end
else else
tag = tags.first tag = tags.first
tag_label(tag[1], tag[2]) tag_label(tag[1], tag[2])
@ -128,7 +130,7 @@ module DossierHelper
end end
def tag_label(name, color) def tag_label(name, color)
tag.span(name, class: "fr-tag fr-tag--sm fr-tag--#{color}") tag.span(name, class: "fr-tag fr-tag--sm fr-tag--#{color}")
end end
def demandeur_dossier(dossier) def demandeur_dossier(dossier)