Skip to content

Commit

Permalink
Make educations columns html safe after sanitizing qualification kind
Browse files Browse the repository at this point in the history
label
  • Loading branch information
TheWalkingLeek committed Oct 27, 2023
1 parent b52e718 commit 15dfd9c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/helpers/group_educations_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ def joined_qualification_kind_labels(person)
reverse.
uniq(&:qualification_kind).
collect do |q|
label = "#{q.qualification_kind.label} #{format_attr(q, :finish_at)}".strip
label = "#{h(q.qualification_kind.label)} #{format_attr(q, :finish_at)}".strip
content_tag(:span, label, class: qualification_label_class(q))
end.
join('<br/>')
join('<br/>').
html_safe
end

def joined_event_participations(person)
Expand All @@ -30,7 +31,8 @@ def joined_event_participations(person)
collect do |p|
format_open_participation_event(p)
end.
join(', ')
join(', ').
html_safe
end

def format_open_participation_event(participation)
Expand Down

0 comments on commit 15dfd9c

Please sign in to comment.