From 8f55704928ac16599a62678fc1c3a83d83f43a21 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 21 Oct 2010 16:21:28 -0400 Subject: Fixed mixed text and elements bug in tostring. XML of the form foo bar baz was outputted as foo bar baz baz. Includes unit test. --- sleekxmpp/xmlstream/tostring/tostring26.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'sleekxmpp/xmlstream/tostring/tostring26.py') 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"" % 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" % (xml_escape(xml.text), tag_name)) -- cgit v1.2.3