diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-10-20 21:55:24 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-10-20 21:55:24 +0200 |
commit | aa6738800d67c5061d7e551b3d896f3366296045 (patch) | |
tree | 769beed98d0b407282e155a02789e9f8e05e9d0d /src/tabs.py | |
parent | 354006a850490cdbf9a598d237ac78f084114e72 (diff) | |
download | poezio-aa6738800d67c5061d7e551b3d896f3366296045.tar.gz poezio-aa6738800d67c5061d7e551b3d896f3366296045.tar.bz2 poezio-aa6738800d67c5061d7e551b3d896f3366296045.tar.xz poezio-aa6738800d67c5061d7e551b3d896f3366296045.zip |
Fix crash on completion of recent words containing xhtml-im attributes
fixes #2278
Diffstat (limited to 'src/tabs.py')
-rw-r--r-- | src/tabs.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tabs.py b/src/tabs.py index 2b1b586a..cd9450a7 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -289,7 +289,7 @@ class ChatTab(Tab): for msg in self._room.messages[:-40:-1]: if not msg: continue - txt = msg.txt + txt = xhtml.clean_text(msg.txt) for char in char_we_dont_want: txt = txt.replace(char, ' ') for word in txt.split(): @@ -300,7 +300,7 @@ class ChatTab(Tab): def on_enter(self): txt = self.input.key_enter() if txt: - clean_text = xhtml.clean_text(txt) + clean_text = xhtml.clean_text_simple(txt) if not self.execute_command(clean_text): if txt.startswith('//'): txt = txt[1:] @@ -683,7 +683,7 @@ class MucTab(ChatTab): if line.find('\x19') == -1: msg['body'] = line else: - msg['body'] = xhtml.clean_text(line) + msg['body'] = xhtml.clean_text_simple(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'] = needed @@ -1075,7 +1075,7 @@ class PrivateTab(ChatTab): if line.find('\x19') == -1: msg['body'] = line else: - msg['body'] = xhtml.clean_text(line) + msg['body'] = xhtml.clean_text_simple(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: needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active' @@ -1746,7 +1746,7 @@ class ConversationTab(ChatTab): if line.find('\x19') == -1: msg['body'] = line else: - msg['body'] = xhtml.clean_text(line) + msg['body'] = xhtml.clean_text_simple(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: needed = 'inactive' if self.core.status.show in ('xa', 'away') else 'active' |