diff --git a/src/plugins/plugin_xep_0277.py b/src/plugins/plugin_xep_0277.py
index 8e8f912e..166f2c87 100755
--- a/src/plugins/plugin_xep_0277.py
+++ b/src/plugins/plugin_xep_0277.py
@@ -370,7 +370,14 @@ class XEP_0277(object):
xml_content = u'
{converted}
'.format(
ns=NS_XHTML,
converted=converted)
- elem.addChild(xml_tools.ElementParser()(xml_content))
+ div_elt = xml_tools.ElementParser()(xml_content)
+ if len(div_elt.children) == 1:
+ # if we have two wrapping the content,
+ # we remove the one we have just added
+ child = div_elt.children[0]
+ if child.name == 'div' and not child.attributes and child.uri == div_elt.uri:
+ div_elt = child
+ elem.addChild(div_elt)
elem['type'] = 'xhtml'
if elem_name not in data:
# there is raw text content, which is mandatory