From 00152358deb824b03830f5d2d03d5588c08db71e Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Fri, 13 Sep 2013 10:01:33 -0700 Subject: Normalize handling html body content Closes issue #261 --- sleekxmpp/plugins/xep_0071/stanza.py | 5 +++-- 1 file 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 = '