summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-06 22:52:51 +0100
committermathieui <mathieui@mathieui.net>2013-03-06 22:53:42 +0100
commitcbf563583cfa429397eabf81f009dfe78dd74398 (patch)
treefe2eda044ae64f601abec6763b672cafd3100a14 /src
parent3f71405efd5910a1e150afa2c46f1f001b39dc18 (diff)
downloadpoezio-cbf563583cfa429397eabf81f009dfe78dd74398.tar.gz
poezio-cbf563583cfa429397eabf81f009dfe78dd74398.tar.bz2
poezio-cbf563583cfa429397eabf81f009dfe78dd74398.tar.xz
poezio-cbf563583cfa429397eabf81f009dfe78dd74398.zip
FIX XHTML ISSUES DUE TO A SLEEKXMPP UPDATE
(THE NAMESPACE WAS NOT PRESENT ANYMORE)
Diffstat (limited to 'src')
-rw-r--r--src/xhtml.py5
1 files changed, 2 insertions, 3 deletions
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 " "