summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0071/stanza.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sleekxmpp/plugins/xep_0071/stanza.py b/sleekxmpp/plugins/xep_0071/stanza.py
index ce91c552..d5ff1a1b 100644
--- a/sleekxmpp/plugins/xep_0071/stanza.py
+++ b/sleekxmpp/plugins/xep_0071/stanza.py
@@ -7,6 +7,7 @@
"""
from sleekxmpp.stanza import Message
+from sleekxmpp.util import unicode
from sleekxmpp.thirdparty import OrderedDict
from sleekxmpp.xmlstream import ElementBase, ET, register_stanza_plugin, tostring
@@ -31,9 +32,9 @@ class XHTML_IM(ElementBase):
self.set_body(subcontent, sublang)
else:
if isinstance(content, type(ET.Element('test'))):
- content = ET.tostring(content)
+ content = unicode(ET.tostring(content))
else:
- content = str(content)
+ content = unicode(content)
header = '<body xmlns="%s"' % XHTML_NS
if lang:
header = '%s xml:lang="%s"' % (header, lang)