share_post: prevent double-quoting in Twitter URL

Both parameters being concatenated have already been quoted: don't do
that twice. Do make sure to quote the separating space though.
This commit is contained in:
Giel van Schijndel 2015-01-03 22:23:58 +01:00 committed by Justin Mayer
commit f510f7f9e6

View file

@ -38,7 +38,7 @@ def share_post(content):
url = article_url(content)
summary = article_summary(content)
tweet = quote(('%s %s' % (title, url)).encode('utf-8'))
tweet = ('%s%s%s' % (title, quote(' '), url)).encode('utf-8')
facebook_link = 'http://www.facebook.com/sharer/sharer.php?s=100&p%%5Burl%%5D=%s' % url
gplus_link = 'https://plus.google.com/share?url=%s' % url
twitter_link = 'http://twitter.com/home?status=%s' % tweet