FIX XHTML ISSUES DUE TO A SLEEKXMPP UPDATE
(THE NAMESPACE WAS NOT PRESENT ANYMORE)
This commit is contained in:
parent
3f71405efd
commit
cbf563583c
1 changed files with 2 additions and 3 deletions
|
@ -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 " "
|
||||
|
|
Loading…
Reference in a new issue