From c3c339c9ef9d968d6f8f7e310b12efb7bbc2d4ac Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Sun, 23 Nov 2014 10:20:52 -0800 Subject: fix html entities in message text --- wee_slack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 676e8e8..102211f 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -7,6 +7,7 @@ import sha import re import urllib import urlparse +import HTMLParser from websocket import create_connection #hack to make tests possible.. better way? @@ -430,7 +431,7 @@ class Channel(SlackThing): if message != self.previous_prnt_message: if message.startswith(self.previous_prnt_message): message = message[len(self.previous_prnt_message):] - #dbg([message, self.previous_prnt_message]) + message = HTMLParser.HTMLParser().unescape(message) w.prnt_date_tags(self.channel_buffer, time, tags, "%s\t%s" % (name, message)) #eventually maybe - doesn't reprint name if next message is same user #if name != self.previous_prnt_name: @@ -969,7 +970,7 @@ def slack_ping_cb(data, remaining): def slack_connection_persistence_cb(data, remaining_calls): for server in servers: if not server.connected: - w.prnt("", "%s disconnected from slack, trying to reconnect.." % (server.token)) + server.buffer_prnt("Disconnected from slack, trying to reconnect..") if server.ws_hook != None: w.unhook(server.ws_hook) server.connect_to_slack() -- cgit