zephyr_mirror: Don't un-HTML-escape messages forwarded to MIT

The messages coming in from the API should no longer contain these entities,
unless the user typed them.

(imported from commit d6b6aa300557d4603c68ffc3b5966115a5787aae)
This commit is contained in:
Keegan McAllister 2012-10-11 13:34:30 -04:00
parent 6aac490dc8
commit 717186a149

View file

@ -243,10 +243,8 @@ def forward_to_zephyr(message):
print "ERROR! Couldn't compute zsig for %s!" % (message["sender_email"])
return
content = message["content"]
cleaned_content = content.replace('&lt;','<').replace('&gt;','>').replace('&amp;', '&')
wrapped_content = "\n".join("\n".join(textwrap.wrap(line))
for line in cleaned_content.split("\n"))
for line in message["content"].split("\n"))
print "Sending message from %s humbug=>zephyr at %s" % (message["sender_email"], datetime.datetime.now())
if message['type'] == "stream":