Fixed tostring bug when using mapped namespaces.
This commit is contained in:
@@ -46,7 +46,7 @@ def tostring(xml=None, xmlns='', stanza_ns='', stream=None, outbuffer=''):
|
||||
if stream and tag_xmlns in stream.namespace_map:
|
||||
mapped_namespace = stream.namespace_map[tag_xmlns]
|
||||
if mapped_namespace:
|
||||
tag = "%s:%s" % (mapped_namespace, tag_name)
|
||||
tag_name = "%s:%s" % (mapped_namespace, tag_name)
|
||||
output.append("<%s" % tag_name)
|
||||
output.append(namespace)
|
||||
|
||||
|
@@ -49,7 +49,7 @@ def tostring(xml=None, xmlns='', stanza_ns='', stream=None, outbuffer=''):
|
||||
if stream and tag_xmlns in stream.namespace_map:
|
||||
mapped_namespace = stream.namespace_map[tag_xmlns]
|
||||
if mapped_namespace:
|
||||
tag = u"%s:%s" % (mapped_namespace, tag_name)
|
||||
tag_name = u"%s:%s" % (mapped_namespace, tag_name)
|
||||
output.append(u"<%s" % tag_name)
|
||||
output.append(namespace)
|
||||
|
||||
|
Reference in New Issue
Block a user