mirror of https://github.com/zulip/zulip.git
Unescape Zephyr content before wrapping.
Now we no longer have weird wrapping based on the length of escaped lines. (imported from commit fa2c9bc0903e22858acc2af4cd6be34e28ea25db)
This commit is contained in:
parent
33ad7817a4
commit
4dcde9b11a
|
@ -260,9 +260,12 @@ def send_zephyr(message):
|
||||||
if ' dot ' in zsig:
|
if ' dot ' in zsig:
|
||||||
print "ERROR! Couldn't compute zsig for %s!" % (message["sender_email"])
|
print "ERROR! Couldn't compute zsig for %s!" % (message["sender_email"])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
content = message["content"]
|
||||||
|
cleaned_content = content.replace('<','<').replace('>','>').replace('&', '&')
|
||||||
wrapped_content = "\n".join("\n".join(textwrap.wrap(line))
|
wrapped_content = "\n".join("\n".join(textwrap.wrap(line))
|
||||||
for line in message["content"].split("\n"))
|
for line in cleaned_content.split("\n"))
|
||||||
wrapped_content = wrapped_content.replace('<','<').replace('>','>').replace('&', '&')
|
|
||||||
print "Sending message from %s humbug=>zephyr at %s" % (message["sender_email"], datetime.datetime.now())
|
print "Sending message from %s humbug=>zephyr at %s" % (message["sender_email"], datetime.datetime.now())
|
||||||
if message['type'] == "class":
|
if message['type'] == "class":
|
||||||
zeph = zephyr.ZNotice(sender=message["sender_email"].replace("mit.edu", "ATHENA.MIT.EDU"),
|
zeph = zephyr.ZNotice(sender=message["sender_email"].replace("mit.edu", "ATHENA.MIT.EDU"),
|
||||||
|
|
Loading…
Reference in New Issue