From 07fc605923eb6f64318b9559d3eecf979789ae3e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 18 Dec 2024 17:08:04 +0000 Subject: [PATCH] Use safe_join to join social sharing buttons --- app/helpers/social_share_button_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/social_share_button_helper.rb b/app/helpers/social_share_button_helper.rb index 90618a9245..da49347c30 100644 --- a/app/helpers/social_share_button_helper.rb +++ b/app/helpers/social_share_button_helper.rb @@ -16,7 +16,7 @@ def social_share_buttons(title:, url:) tag.div( :class => "social-share-button d-flex gap-1 align-items-end flex-wrap mb-3" ) do - SOCIAL_SHARE_CONFIG.map do |site, icon| + safe_join(SOCIAL_SHARE_CONFIG.map do |site, icon| link_options = { :rel => "nofollow", :class => "ssb-icon rounded-circle", @@ -27,7 +27,7 @@ def social_share_buttons(title:, url:) link_to generate_share_url(site, title, url), link_options do image_tag(icon, :alt => I18n.t("application.share.#{site}.alt"), :size => 28) end - end.join.html_safe + end, "\n") end end