changeset 15122:c6978ee9ac4d

[gaim-migrate @ 17908] maybe fix 1608655 committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 07 Dec 2006 04:25:29 +0000
parents e3e668ddf945
children c8957b9c6202
files libgaim/xmlnode.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/xmlnode.c	Thu Dec 07 04:04:11 2006 +0000
+++ b/libgaim/xmlnode.c	Thu Dec 07 04:25:29 2006 +0000
@@ -294,9 +294,12 @@
 	g_string_append_printf(text, "<%s", node_name);
 
 	if (node->namespace) {
-		char *namespace = g_markup_escape_text(node->namespace, -1);
-		g_string_append_printf(text, " xmlns='%s'", namespace);
-		g_free(namespace);
+		if(!node->parent || !node->parent->namespace || strcmp(node->namespace, node->parent->namespace))
+		{
+			char *namespace = g_markup_escape_text(node->namespace, -1);
+			g_string_append_printf(text, " xmlns='%s'", namespace);
+			g_free(namespace);
+		}
 	}
 	for(c = node->child; c; c = c->next)
 	{