fixes html validation on whatsapp share

This commit is contained in:
Alberto Garcia Cabeza
2017-03-27 19:01:39 +02:00
parent ed8c470450
commit b4e81d60fc
4 changed files with 4 additions and 4 deletions

View File

@@ -103,7 +103,7 @@
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{investment.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <% if browser.device.mobile? %>
<a href="whatsapp://send?text=<%= investment.title %> <%= budget_investment_url(budget_id: investment.budget_id, id: investment.id) %>" data-action="share/whatsapp/share"> <a href="whatsapp://send?text=<%= investment.title.gsub(/\s/, '&nbsp;' %>&nbsp;<%= budget_investment_url(budget_id: investment.budget_id, id: investment.id) %>" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>

View File

@@ -53,7 +53,7 @@
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{@debate.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{@debate.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <% if browser.device.mobile? %>
<a href="whatsapp://send?text=<%= @debate.title %> <%= debate_url(@debate) %>" data-action="share/whatsapp/share"> <a href="whatsapp://send?text=<%= @debate.title.gsub(/\s/, '&nbsp;' %>&nbsp;<%= debate_url(@debate) %>" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>

View File

@@ -126,7 +126,7 @@
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <% if browser.device.mobile? %>
<a href="whatsapp://send?text=<%= @proposal.title %> <%= proposal_url(@proposal) %>" data-action="share/whatsapp/share"> <a href="whatsapp://send?text=<%= @proposal.title.gsub(/\s/, '&nbsp;') %>&nbsp;<%= proposal_url(@proposal) %>" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>

View File

@@ -45,7 +45,7 @@
<div class="social-share-full"> <div class="social-share-full">
<%= social_share_button_tag("#{@spending_proposal.title} #{setting['twitter_hashtag']}") %> <%= social_share_button_tag("#{@spending_proposal.title} #{setting['twitter_hashtag']}") %>
<% if browser.device.mobile? %> <% if browser.device.mobile? %>
<a href="whatsapp://send?text=<%= @spending_proposal.title %> <%= spending_proposal_url(@spending_proposal) %>" data-action="share/whatsapp/share"> <a href="whatsapp://send?text=<%= @spending_proposal.title.gsub(/\s/, '&nbsp;' %>&nbsp;<%= spending_proposal_url(@spending_proposal) %>" data-action="share/whatsapp/share">
<span class="icon-whatsapp whatsapp"></span> <span class="icon-whatsapp whatsapp"></span>
<span class="sr-only"><%= t("social.whatsapp") %></span> <span class="sr-only"><%= t("social.whatsapp") %></span>
</a> </a>