mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
email_mirror: Filter out null characters in email bodies.
They're rarely useful, usually displayed invisibly in most tools anyway, and this helps make sure the message makes it into Zulip rather than being rejected.
This commit is contained in:
@@ -148,6 +148,8 @@ def mark_missed_message_address_as_used(address):
|
||||
def construct_zulip_body(message, realm):
|
||||
# type: (message.Message, Realm) -> Text
|
||||
body = extract_body(message)
|
||||
# Remove null characters, since Zulip will reject
|
||||
body = body.replace("\x00", "")
|
||||
body = filter_footer(body)
|
||||
body += extract_and_upload_attachments(message, realm)
|
||||
if not body:
|
||||
|
||||
Reference in New Issue
Block a user