From cdfc6dc10ae48acbef85db42269768caaaf437d3 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 4 Sep 2013 15:12:33 -0400 Subject: [PATCH] bugdown: Fetch youtube preview images over HTTPS. (imported from commit 9dbf3c21083cbbcf1288789f400c33ec735d4416) --- zerver/lib/bugdown/__init__.py | 2 +- zerver/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index 911fe5a6ec..7e21ae3473 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -171,7 +171,7 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor): match = re.match(youtube_re, url) if match is None: return None - return "http://i.ytimg.com/vi/%s/default.jpg" % (match.group(2),) + return "https://i.ytimg.com/vi/%s/default.jpg" % (match.group(2),) def twitter_link(self, url): tweet_id = get_tweet_id(url) diff --git a/zerver/tests.py b/zerver/tests.py index a64029f265..bc11987fce 100644 --- a/zerver/tests.py +++ b/zerver/tests.py @@ -2624,7 +2624,7 @@ xxxxxxx

\n

xxxxxxx xxxxx xxxx xxxxx:
\nxxxxxx: xxx if settings.USING_EMBEDLY: self.assertEqual(converted, '

Check out the debate: http://www.youtube.com/watch?v=hx1mjT73xYE

\n') else: - self.assertEqual(converted, '

Check out the debate: http://www.youtube.com/watch?v=hx1mjT73xYE

\n
') + self.assertEqual(converted, '

Check out the debate: http://www.youtube.com/watch?v=hx1mjT73xYE

\n
') def test_inline_dropbox(self): msg = 'Look at how hilarious our old office was: https://www.dropbox.com/s/ymdijjcg67hv2ta/IMG_0923.JPG'