From 1769ca0492716f16357ef0ccca573e6cd0635300 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 13 Nov 2013 14:02:02 +0100 Subject: [PATCH] plugin XEP-0071: XHTML2XHTML_IM don't return the root tag anymore. --- src/plugins/plugin_xep_0071.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/plugin_xep_0071.py b/src/plugins/plugin_xep_0071.py index e5a2626b..78389f2b 100644 --- a/src/plugins/plugin_xep_0071.py +++ b/src/plugins/plugin_xep_0071.py @@ -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)