Url encode article's title for Twitter sharing (#1092)

This commit is contained in:
rhymes 2018-11-12 17:58:20 +01:00 committed by Ben Halpern
parent 9340b47d33
commit 72ce2f0e6d

View file

@ -16,7 +16,7 @@
</button>
<a class="article-actions-tweet-button"
target='_blank'
href='https://twitter.com/intent/tweet?text="<%= @article.title %>" by <%= @article.user.twitter_username ? "@" + @article.user.twitter_username : @article.user.name %> %23DEVcommunity https://dev.to<%= @article.path %>'>
href='https://twitter.com/intent/tweet?text="<%=u @article.title.strip %>" by <%= @article.user.twitter_username ? "@" + @article.user.twitter_username : @article.user.name %> %23DEVcommunity https://dev.to<%= @article.path %>'>
<img src="<%= asset_path("twitter.svg") %>" />
</a>
<a class="article-actions-comments-count" href="#comments" id="jump-to-comments">