mirror of https://github.com/zulip/zulip.git
Don't show broken images in digest and missed PMs emails.
(imported from commit 92297b4c8f020e30b5c00e93bf32df6e19069dd8)
This commit is contained in:
parent
96ea91056e
commit
0d7ea7353f
|
@ -1897,6 +1897,12 @@ def build_message_list(user_profile, messages):
|
|||
content = re.sub(
|
||||
r"/user_uploads/(\S*)",
|
||||
settings.EXTERNAL_HOST + r"/user_uploads/\1", content)
|
||||
|
||||
# Our proxying user-uploaded images seems to break inline images in HTML
|
||||
# emails, so scrub the image but leave the link.
|
||||
content = re.sub(
|
||||
r"<img src=(\S+)/user_uploads/(\S+)>", "", content)
|
||||
|
||||
# URLs for emoji are of the form
|
||||
# "static/third/gemoji/images/emoji/snowflake.png".
|
||||
content = re.sub(
|
||||
|
|
Loading…
Reference in New Issue