From 67639847eb9c950b1bfa88206b2a1da7957cdc37 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 25 Jun 2011 15:52:53 +0200 Subject: [PATCH] Fixed #2190 --- src/tabs.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/tabs.py b/src/tabs.py index 66a34272..28ebd60d 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -991,7 +991,11 @@ class PrivateTab(ChatTab): def command_say(self, line): msg = self.core.xmpp.make_message(self.get_name()) msg['type'] = 'chat' - msg['body'] = line + if line.find('\x19') == -1: + msg['body'] = line + else: + msg['body'] = xhtml.clean_text(line) + msg['xhtml_im'] = xhtml.poezio_colors_to_html(line) if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False: msg['chat_state'] = 'active' msg.send() @@ -1478,7 +1482,11 @@ class ConversationTab(ChatTab): def command_say(self, line): msg = self.core.xmpp.make_message(self.get_name()) msg['type'] = 'chat' - msg['body'] = line + if line.find('\x19') == -1: + msg['body'] = line + else: + msg['body'] = xhtml.clean_text(line) + msg['xhtml_im'] = xhtml.poezio_colors_to_html(line) if config.get('send_chat_states', 'true') == 'true' and self.remote_wants_chatstates is not False: msg['chat_state'] = 'active' msg.send()