mirror of https://github.com/zulip/zulip.git
Host "preview failed" image locally.
Who knows when this Cloudfront URL will stop working! (imported from commit 39f2908a32c0276b1d87ecedc876c71dd35a9b2f)
This commit is contained in:
parent
12cb8ceae0
commit
569abda653
|
@ -297,7 +297,7 @@ class InlineInterestingLinkProcessor(markdown.treeprocessors.Treeprocessor):
|
|||
image_info["title"] = filename
|
||||
image_info["desc"] = ""
|
||||
# Dropbox's "unable to preview" image
|
||||
image_info["image"] = "https://dt8kf6553cww8.cloudfront.net/static/images/preview_fail-vflc3IDxf.png"
|
||||
image_info["image"] = "/static/images/preview_fail.png"
|
||||
|
||||
image_info["is_image"] = is_image
|
||||
return image_info
|
||||
|
|
|
@ -209,7 +209,7 @@ class BugdownTest(TestCase):
|
|||
# Don't fail on bad dropbox links
|
||||
msg = "https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM"
|
||||
converted = bugdown_convert(msg)
|
||||
self.assertEqual(converted, '<p><a href="https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM" target="_blank" title="https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM">https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM</a></p>\n<div class="message_inline_image"><a href="https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM" target="_blank" title="ROmr9K1XYtmpneM"><img src="https://dt8kf6553cww8.cloudfront.net/static/images/preview_fail-vflc3IDxf.png"></a></div>')
|
||||
self.assertEqual(converted, '<p><a href="https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM" target="_blank" title="https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM">https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM</a></p>\n<div class="message_inline_image"><a href="https://meta-dbdev.dev.corp.dropbox.com/photos/cl/ROmr9K1XYtmpneM" target="_blank" title="ROmr9K1XYtmpneM"><img src="/static/images/preview_fail.png"></a></div>')
|
||||
|
||||
def test_twitter_id_extraction(self):
|
||||
self.assertEqual(bugdown.get_tweet_id('http://twitter.com/#!/VizzQuotes/status/409030735191097344'), '409030735191097344')
|
||||
|
|
Loading…
Reference in New Issue