From c5cc462963363b2307a2a341da170829385a9589 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 17 Jan 2013 17:37:06 +0100 Subject: Move to the upstream SleekXMPP - remove the decline command that is not in the trunk (and mediated declines are supported nowhere anyway) - change a bit xhtml-im support - change the bookmarks management a bit - Add a verification to avoid crashing when poezio will be launched the next time - Fix the (unrelated) bug when setting a jid affiliation --- src/xhtml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/xhtml.py') diff --git a/src/xhtml.py b/src/xhtml.py index a36607d2..1c9c20e7 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -191,7 +191,7 @@ def get_body_from_message_stanza(message): the body (without any color) otherwise """ if config.get('enable_xhtml_im', 'true') == 'true': - xhtml_body = message['xhtml_im'] + xhtml_body = message['html']['body'] if xhtml_body: content = xhtml_to_poezio_colors(xhtml_body) content = content if content else message['body'] @@ -224,7 +224,7 @@ def ncurses_color_to_html(color): r = g = b = color / 24 * 6 return '#%02X%02X%02X' % (r*256/6, g*256/6, b*256/6) -def xhtml_to_poezio_colors(text): +def xhtml_to_poezio_colors(xml): def parse_css(css): def get_color(value): if value[0] == '#': @@ -283,7 +283,6 @@ def xhtml_to_poezio_colors(text): def trim(string): return re.sub(whitespace_re, ' ', string) - xml = ET.fromstring(text) message = '' if version_info[1] == 2: elems = xml.iter() -- cgit v1.2.3