diff --git a/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb b/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb
index a8888fd7713f..e16587896854 100644
--- a/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb
+++ b/decidim-core/app/views/layouts/decidim/header/_menu_breadcrumb_items.html.erb
@@ -1,5 +1,5 @@
<% breadcrumb_items.each_with_index do |item, i| %>
- <% item_label = decidim_html_escape(translated_attribute(item[:label])) %>
+ <% item_label = translated_attribute(item[:label]) %>
/
<% if item[:dropdown_cell].present? %>
@@ -22,9 +22,9 @@
<% else %>
- <%= link_to_if(item[:url].present? && !is_active_link?(item[:url], :exclusive), item_label, item[:url], class:"menu-bar__breadcrumb-desktop__dropdown-wrapper menu-bar__breadcrumb-desktop__dropdown-trigger", "aria-current": (item[:active] ? "page" : nil)) do %>
+ <%= link_to_if(item[:url].present? && !is_active_link?(item[:url], :exclusive), item_label, item[:url], class: "menu-bar__breadcrumb-desktop__dropdown-wrapper menu-bar__breadcrumb-desktop__dropdown-trigger", "aria-current": (item[:active] ? "page" : nil)) do %>
<%# alternative template %>
- <%= content_tag :span, item_label, class:"menu-bar__breadcrumb-desktop__dropdown-trigger no-interactive", tabindex: "0", "aria-current": "page" if item[:active] %>
+ <%= content_tag :span, item_label, class: "menu-bar__breadcrumb-desktop__dropdown-trigger no-interactive", tabindex: "0", "aria-current": "page" if item[:active] %>
<% end %>
<% end %>
<% end %>
diff --git a/decidim-core/spec/system/menu_spec.rb b/decidim-core/spec/system/menu_spec.rb
index cd47ffe105de..0791c3b40263 100644
--- a/decidim-core/spec/system/menu_spec.rb
+++ b/decidim-core/spec/system/menu_spec.rb
@@ -33,4 +33,20 @@
end
end
end
+
+ context "when rendering a component with special characters" do
+ let(:component_name) { "Collaborative Drafts & Amendments" }
+ let(:participatory_space) { create(:participatory_process, organization:) }
+ let(:proposal_component) { create(:proposal_component, name: { en: component_name }, participatory_space:) }
+ let(:proposal) { create(:proposal, component: proposal_component) }
+ let(:proposal_path) { Decidim::ResourceLocatorPresenter.new(proposal).path }
+
+ before do
+ visit proposal_path
+ end
+
+ it "renders the component name correctly" do
+ expect(page).to have_selector(".menu-bar__breadcrumb-desktop__dropdown-wrapper", text: component_name)
+ end
+ end
end