Skip to content

Commit

Permalink
Url encode article's title for Twitter sharing (forem#1092)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhymes authored and benhalpern committed Nov 12, 2018
1 parent 9340b47 commit 72ce2f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/articles/_actions.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down

0 comments on commit 72ce2f0

Please sign in to comment.