From 717186a14901cc6dfa478dbcd4f7ee9e9b192742 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Thu, 11 Oct 2012 13:34:30 -0400 Subject: [PATCH] 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) --- zephyr_mirror.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/zephyr_mirror.py b/zephyr_mirror.py index 4b7fd2a..ac1b452 100644 --- a/zephyr_mirror.py +++ b/zephyr_mirror.py @@ -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('<','<').replace('>','>').replace('&', '&') 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":