Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix rendering Image With Text page section (#12428)

Łukasz Adamczyk1ec3ad804b80
diff --git a/storefront/app/helpers/spree/page_helper.rb b/storefront/app/helpers/spree/page_helper.rb
index 5f4efa13d3..b9d1c8791e 100644
--- a/storefront/app/helpers/spree/page_helper.rb
+++ b/storefront/app/helpers/spree/page_helper.rb
@@ -55,7 +55,7 @@ module Spree
block.present? ? block.call : options[:label]
end
else
- block&.call
+ block&.call&.html_safe
end
end
end
diff --git a/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erb b/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erb
index 4aa07db7a9..faa15147bb 100644
--- a/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erb
+++ b/storefront/app/views/themes/default/spree/page_sections/_image_with_text.html.erb
@@ -14,7 +14,7 @@
}.join(', ')
%>
<% else %>
- <div class="w-full h-full object-cover bg-gray-100"></div>
+ <%= content_tag(:div, '', class: 'w-full h-full object-cover bg-gray-100') %>
<% end %>
<% end %>
</div>