aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2011-11-09 11:46:04 +0100
committerWojciech Polak <polak@gnu.org>2011-11-09 11:46:04 +0100
commitf83f6cb65e7ea49fbc4e7107afdfe8de091560ef (patch)
tree14558cbba7fd3b781cfa8b0ed112fc9e73941bea
parentf13e359df003dbb0d182011012da9128b2c15c5d (diff)
downloadglifestream-f83f6cb65e7ea49fbc4e7107afdfe8de091560ef.tar.gz
glifestream-f83f6cb65e7ea49fbc4e7107afdfe8de091560ef.tar.bz2
Use secure Twitter.
-rw-r--r--filters/expand.py2
-rw-r--r--filters/twyntax.py6
-rw-r--r--stream/templatetags/gls_filters.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/filters/expand.py b/filters/expand.py
index 9900a8f..ac4af68 100644
--- a/filters/expand.py
+++ b/filters/expand.py
@@ -38,7 +38,7 @@ def shorturls (text):
return re.sub (r'http://(tinyurl\.com|bit\.ly|goo\.gl|t\.co|is\.gd' \
'|ur1\.ca|2tu\.us|ff\.im|post\.ly|awe\.sm|lnk\.ms|pic\.gd' \
'|tl\.gd|youtu\.be|tiny\.cc|ow\.ly|j\.mp|url4\.eu' \
- ')(/[-\w]+)', __su_subs, smart_unicode (text))
+ ')(/[\-\w]+)', __su_subs, smart_unicode (text))
#
# Short image services
diff --git a/filters/twyntax.py b/filters/twyntax.py
index 6980d18..2303059 100644
--- a/filters/twyntax.py
+++ b/filters/twyntax.py
@@ -1,4 +1,4 @@
-# gLifestream Copyright (C) 2009 Wojciech Polak
+# gLifestream Copyright (C) 2009, 2011 Wojciech Polak
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -30,7 +30,7 @@ def at_reply (tweet, type='twitter'):
repl = (r'\1@<a href="http://identi.ca/\g<user>"'
r' title="\g<user> on Identi.ca" rel="nofollow">\g<user></a>\3')
else:
- repl = (r'\1@<a href="http://twitter.com/\g<user>"'
+ repl = (r'\1@<a href="https://twitter.com/\g<user>"'
r' title="\g<user> on Twitter" rel="nofollow">\g<user></a>\3')
return pattern.sub (repl, tweet)
@@ -40,5 +40,5 @@ def hash_tag (tweet, type='twitter'):
r'\1#<a href="http://identi.ca/tag/\2" title="#\2 search Identi.ca" rel="nofollow">\2</a>',
tweet)
return re.sub (r'(\A|\s)#(\w[\w\-]+)',
- r'\1#<a href="http://search.twitter.com/search?q=%23\2" title="#\2 search Twitter" rel="nofollow">\2</a>',
+ r'\1#<a href="https://twitter.com/search/%23\2" title="#\2 search Twitter" rel="nofollow">\2</a>',
tweet)
diff --git a/stream/templatetags/gls_filters.py b/stream/templatetags/gls_filters.py
index c5fe4ff..9fd459b 100644
--- a/stream/templatetags/gls_filters.py
+++ b/stream/templatetags/gls_filters.py
@@ -106,7 +106,7 @@ def gls_mediarss (e, entry):
def gls_reply_url (e, entry):
if entry.service.api == 'twitter':
u = entry.link.split ('/')
- return 'http://twitter.com/?status=@%s%%20&in_reply_to_status_id=%s&in_reply_to=%s' % (u[3], u[5], u[3])
+ return 'https://twitter.com/?status=@%s%%20&in_reply_to_status_id=%s&in_reply_to=%s' % (u[3], u[5], u[3])
elif entry.service.api == 'identica':
return 'http://identi.ca/notice/new?replyto=%s' % entry.author_name
return '#'

Return to:

Send suggestions and report system problems to the System administrator.