Skip to content

Commit

Permalink
Use safe_join to join social sharing buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Dec 19, 2024
1 parent 88946c3 commit 07fc605
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/helpers/social_share_button_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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

Expand Down

0 comments on commit 07fc605

Please sign in to comment.