Skip to content

Commit

Permalink
Remove extraneous & from Twitter share URL
Browse files Browse the repository at this point in the history
  • Loading branch information
tdg5 committed Sep 9, 2015
1 parent f2c188b commit e711b2f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lib/octopress-social/twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def tweet_link(site, item)
end

def tweet_url(site, item)
"https://twitter.com/intent/tweet?&text=#{ERB::Util.url_encode(message(site, item)).strip}"
"https://twitter.com/intent/tweet?text=#{ERB::Util.url_encode(message(site, item)).strip}"
end

def tweet_button(site, item)
Expand Down
4 changes: 2 additions & 2 deletions test/site/_expected/post-loop.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ <h2>Share post</h2>
<div class="g-plus" data-action="share" data-href="http://example.com/blog/share-post/" data-annotation="none" data-width="" data-size="medium"></div>

Share Links:
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="g-plus-share-link" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Google+">Google+</a>
<a class="facebook-share-link" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Facebook">Facebook</a>
<a class="email-share-link" href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share via email">Email</a>

Share URLs:
<a href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
Expand Down
4 changes: 2 additions & 2 deletions test/site/_expected/share-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<div class="g-plus" data-action="share" data-href="http://example.com/blog/share-page.html" data-annotation="none" data-width="" data-size="medium"></div>

Share Links:
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?&text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Twitter">Twitter</a>
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Twitter">Twitter</a>
<a class="g-plus-share-link" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Google+">Google+</a>
<a class="facebook-share-link" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Facebook">Facebook</a>
<a class="email-share-link" href="mailto:?subject=Cool%20Page%20by%20Guy%20McDude&body=Cool%20Page%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share via email">Email</a>

Share URLs:
<a href="https://twitter.com/intent/tweet?&text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Twitter</a>
<a href="https://twitter.com/intent/tweet?text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Twitter</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Facebook</a>
<a href="mailto:?subject=Cool%20Page%20by%20Guy%20McDude&body=Cool%20Page%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Email</a>
Expand Down
4 changes: 2 additions & 2 deletions test/site/_expected/share-post/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<div class="g-plus" data-action="share" data-href="http://example.com/blog/share-post/" data-annotation="none" data-width="" data-size="medium"></div>

Share Links:
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="g-plus-share-link" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Google+">Google+</a>
<a class="facebook-share-link" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Facebook">Facebook</a>
<a class="email-share-link" href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share via email">Email</a>

Share URLs:
<a href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
Expand Down
4 changes: 2 additions & 2 deletions test/site/_site/post-loop.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ <h2>Share post</h2>
<div class="g-plus" data-action="share" data-href="http://example.com/blog/share-post/" data-annotation="none" data-width="" data-size="medium"></div>

Share Links:
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="g-plus-share-link" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Google+">Google+</a>
<a class="facebook-share-link" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Facebook">Facebook</a>
<a class="email-share-link" href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share via email">Email</a>

Share URLs:
<a href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
Expand Down
4 changes: 2 additions & 2 deletions test/site/_site/share-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<div class="g-plus" data-action="share" data-href="http://example.com/blog/share-page.html" data-annotation="none" data-width="" data-size="medium"></div>

Share Links:
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?&text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Twitter">Twitter</a>
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Twitter">Twitter</a>
<a class="g-plus-share-link" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Google+">Google+</a>
<a class="facebook-share-link" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share on Facebook">Facebook</a>
<a class="email-share-link" href="mailto:?subject=Cool%20Page%20by%20Guy%20McDude&body=Cool%20Page%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html" title="Share via email">Email</a>

Share URLs:
<a href="https://twitter.com/intent/tweet?&text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Twitter</a>
<a href="https://twitter.com/intent/tweet?text=Cool%20Page%20by%20%40imathis%20%23awesome%20%23stuff%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Twitter</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Facebook</a>
<a href="mailto:?subject=Cool%20Page%20by%20Guy%20McDude&body=Cool%20Page%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-page.html">Email</a>
Expand Down
4 changes: 2 additions & 2 deletions test/site/_site/share-post/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<div class="g-plus" data-action="share" data-href="http://example.com/blog/share-post/" data-annotation="none" data-width="" data-size="medium"></div>

Share Links:
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="twitter-share-link" href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Twitter">Twitter</a>
<a class="g-plus-share-link" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Google+">Google+</a>
<a class="facebook-share-link" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share on Facebook">Facebook</a>
<a class="email-share-link" href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F" title="Share via email">Email</a>

Share URLs:
<a href="https://twitter.com/intent/tweet?&text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://twitter.com/intent/tweet?text=Share%20post%20by%20%40octopress%20%23test%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Twitter</a>
<a href="https://plus.google.com/share?url=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Google+</a>
<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Facebook</a>
<a href="mailto:?subject=Share%20post%20by%20Guy%20McDude&body=Share%20post%20by%20Guy%20McDude%20-%20http%3A%2F%2Fexample.com%2Fblog%2Fshare-post%2F">Email</a>
Expand Down

0 comments on commit e711b2f

Please sign in to comment.