From cbf563583cfa429397eabf81f009dfe78dd74398 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 6 Mar 2013 22:52:51 +0100 Subject: FIX XHTML ISSUES DUE TO A SLEEKXMPP UPDATE (THE NAMESPACE WAS NOT PRESENT ANYMORE) --- src/xhtml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/xhtml.py b/src/xhtml.py index 62295dc6..cd68b14a 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -191,10 +191,9 @@ def get_body_from_message_stanza(message): the body (without any color) otherwise """ if config.get('enable_xhtml_im', 'true') == 'true': - xhtml_body = message['html']['body'] + xhtml = message['html'].xml + xhtml_body = xhtml.find('{http://www.w3.org/1999/xhtml}body') if xhtml_body: - if isinstance(xhtml_body, str): - xhtml_body = ET.fromstring(xhtml_body) content = xhtml_to_poezio_colors(xhtml_body) content = content if content else message['body'] return content or " " -- cgit v1.2.3