escape quotation marks on whatsapp share links

This commit is contained in:
decabeza
2017-08-16 13:40:12 +02:00
parent 5da7952a18
commit 247ceed3f4

View File

@@ -4,7 +4,7 @@
<% end %>
<div class="social-share-full">
<%= social_share_button_tag("#{title} #{setting['twitter_hashtag']}") %>
<a href="whatsapp://send?text=<%= title.gsub(/\s/, '%20') %>&nbsp;<%= url %>"
<a href="whatsapp://send?text=<%= title.gsub(/\s|"|'/, '%20') %>&nbsp;<%= url %>"
class="show-for-small-only" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span>
<span class="show-for-sr"><%= t("social.whatsapp") %></span>