Skip to content

Commit

Permalink
change decidim_html_escape method to return an html escaped and safe
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdeus committed Nov 26, 2024
1 parent 1f3a870 commit 87bd217
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion decidim-core/app/helpers/decidim/sanitize_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def decidim_sanitize_editor_admin(html, options = {})
end

def decidim_html_escape(text)
ERB::Util.unwrapped_html_escape(text.to_str)
ERB::Util.unwrapped_html_escape(text.to_str).html_safe
end

def decidim_url_escape(text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="menu-bar__breadcrumb-mobile__dropdown-trigger">
<span>
<% breadcrumb_items.last(2).each_with_index do |item, i| %>
<% item_label = decidim_escape_translated(item[:label]).html_safe %>
<% item_label = decidim_escape_translated(item[:label]) %>
<% if i.positive? %>
<span>/</span>
<% end %>
Expand Down

0 comments on commit 87bd217

Please sign in to comment.