diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-06-25 15:52:53 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-06-25 15:52:53 +0200 |
commit | 67639847eb9c950b1bfa88206b2a1da7957cdc37 (patch) | |
tree | c77ad79f10128cde291a1e657954ef973fc7cc6a | |
parent | 306abbf97487d50700c1e63ca2ecba021638cf0e (diff) | |
download | poezio-67639847eb9c950b1bfa88206b2a1da7957cdc37.tar.gz poezio-67639847eb9c950b1bfa88206b2a1da7957cdc37.tar.bz2 poezio-67639847eb9c950b1bfa88206b2a1da7957cdc37.tar.xz poezio-67639847eb9c950b1bfa88206b2a1da7957cdc37.zip |
Fixed #2190
-rw-r--r-- | src/tabs.py | 12 |
1 files 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() |