mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Don't show broken images in digest and missed PMs emails.
(imported from commit 92297b4c8f020e30b5c00e93bf32df6e19069dd8)
This commit is contained in:
@@ -1897,6 +1897,12 @@ def build_message_list(user_profile, messages):
|
|||||||
content = re.sub(
|
content = re.sub(
|
||||||
r"/user_uploads/(\S*)",
|
r"/user_uploads/(\S*)",
|
||||||
settings.EXTERNAL_HOST + r"/user_uploads/\1", content)
|
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
|
# URLs for emoji are of the form
|
||||||
# "static/third/gemoji/images/emoji/snowflake.png".
|
# "static/third/gemoji/images/emoji/snowflake.png".
|
||||||
content = re.sub(
|
content = re.sub(
|
||||||
|
|||||||
Reference in New Issue
Block a user