diff options
author | Lance Stout <lancestout@gmail.com> | 2013-09-13 10:01:33 -0700 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2013-09-13 10:01:33 -0700 |
commit | 00152358deb824b03830f5d2d03d5588c08db71e (patch) | |
tree | 84d267d99b2d23b42d2b8cc0f699c6714b2e4882 /sleekxmpp/plugins/xep_0071/stanza.py | |
parent | a2784be4d6e3a66f17fc46cf8e20fe35cc0b6193 (diff) | |
download | slixmpp-00152358deb824b03830f5d2d03d5588c08db71e.tar.gz slixmpp-00152358deb824b03830f5d2d03d5588c08db71e.tar.bz2 slixmpp-00152358deb824b03830f5d2d03d5588c08db71e.tar.xz slixmpp-00152358deb824b03830f5d2d03d5588c08db71e.zip |
Normalize handling html body content
Closes issue #261
Diffstat (limited to 'sleekxmpp/plugins/xep_0071/stanza.py')
-rw-r--r-- | sleekxmpp/plugins/xep_0071/stanza.py | 5 |
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) |