Fix ampersand not being escaped in Twitter share from the hamburger menu (#3466)

This commit is contained in:
andrewrod33 2019-07-15 08:27:32 -07:00 committed by Ben Halpern
parent 0bbdb3cc21
commit bbc83da539

View file

@ -59,7 +59,8 @@
</div>
<web-share-wrapper shareurl="https://dev.to<%= @article.path %>" sharetext="<%= @article.title %>" template="web-share-button">
<div class="dropdown-link-row">
<a 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 %>'>
<a target="_blank"
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 %>'>
Share to Twitter
</a>
</div>