summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/tostring
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-10-21 16:21:28 -0400
committerLance Stout <lancestout@gmail.com>2010-10-21 16:21:28 -0400
commit8f55704928ac16599a62678fc1c3a83d83f43a21 (patch)
tree46ec7dffa213226c651b45a2ba5e4796d9959b05 /sleekxmpp/xmlstream/tostring
parentd88999691cd36fa9049f8bda522d394d81ba1365 (diff)
downloadslixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.tar.gz
slixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.tar.bz2
slixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.tar.xz
slixmpp-8f55704928ac16599a62678fc1c3a83d83f43a21.zip
Fixed mixed text and elements bug in tostring.
XML of the form <a>foo <b>bar</b> baz</a> was outputted as <a>foo <b>bar</b> baz baz</a>. Includes unit test.
Diffstat (limited to 'sleekxmpp/xmlstream/tostring')
-rw-r--r--sleekxmpp/xmlstream/tostring/tostring26.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/sleekxmpp/xmlstream/tostring/tostring26.py b/sleekxmpp/xmlstream/tostring/tostring26.py
index 0c02f922..0ee432cc 100644
--- a/sleekxmpp/xmlstream/tostring/tostring26.py
+++ b/sleekxmpp/xmlstream/tostring/tostring26.py
@@ -68,9 +68,6 @@ def tostring(xml=None, xmlns='', stanza_ns='', stream=None, outbuffer=''):
for child in xml.getchildren():
output.append(tostring(child, tag_xmlns, stanza_ns, stream))
output.append(u"</%s>" % tag_name)
- if xml.tail:
- # If there is additional text after the element.
- output.append(xml_escape(xml.tail))
elif xml.text:
# If we only have text content.
output.append(u">%s</%s>" % (xml_escape(xml.text), tag_name))