Skip to content

Commit

Permalink
Merge pull request #626 from codeforjapan/fix-escape-accountability-t…
Browse files Browse the repository at this point in the history
…imeline

fix: use `decidim_sanitize_admin` instead of `decidim_escape_translated`
  • Loading branch information
ayuki-joto authored Aug 6, 2024
2 parents 1a8fc7a + 863bcb7 commit 47d3393
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/views/decidim/accountability/results/_timeline.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<div class="small-12 columns">
<div class="section">
<h4 class="section-heading"><%= t(".title") %></h4>
<ol class="timeline">
<% result.timeline_entries.each_with_index do |timeline_entry, i| %>
<li class="timeline__item ">
<div class="timeline__phase">
<span class="timeline__phase__number"><%= i + 1 %></span>
</div>
<div class="timeline__info">
<div class="timeline__description">
<span class="timeline__date text-small">
<%= l timeline_entry.entry_date, format: :decidim_short %>
</span>
<h4 class="timeline__title">
<%= translated_attribute timeline_entry.title %>
</h4>

<% if translated_attribute(timeline_entry.description).present? %>
<div class="timeline__description__description">
<%= decidim_sanitize_admin translated_attribute(timeline_entry.description) %>
</div>
<% end %>
</div>
</div>
</li>
<% end %>
</ol>
</div>
</div>

0 comments on commit 47d3393

Please sign in to comment.