plugin XEP-0071: XHTML2XHTML_IM don't return the <body> root tag anymore.

This commit is contained in:
Goffi 2013-11-13 14:02:02 +01:00
commit 1769ca0492

View file

@ -160,8 +160,13 @@ class XEP_0071(object):
elem.drop_tree()
else:
elem.drop_tag()
if len(body_elt) !=1:
root_elt = body_elt
body_elt.tag = "p"
else:
root_elt = body_elt[0]
return html.tostring(body_elt, encoding='unicode', method='xml')
return html.tostring(root_elt, encoding='unicode', method='xml')
class XEP_0071_handler(XMPPHandler):
implements(iwokkel.IDisco)