Diff

core/xmlhandlers.lua @ 2281:27441b099984

Merge with tip.
author Tobias Markmann <tm@ayena.de>
date Sun, 29 Nov 2009 21:33:37 +0100
parent 2261:13d55c66bf81
child 2463:d9ff0190eb4a
child 2923:b7049746bd29
line wrap: on
line diff
--- a/core/xmlhandlers.lua	Sun Nov 29 21:32:39 2009 +0100
+++ b/core/xmlhandlers.lua	Sun Nov 29 21:33:37 2009 +0100
@@ -50,7 +50,7 @@
 				chardata = {};
 			end
 			local curr_ns,name = tagname:match("^([^\1]*)\1?(.*)$");
-			if not name then
+			if name == "" then
 				curr_ns, name = "", curr_ns;
 			end
 
@@ -63,7 +63,7 @@
 				local k = attr[i];
 				attr[i] = nil;
 				local ns, nm = k:match("^([^\1]*)\1?(.*)$");
-				if ns and nm then
+				if nm ~= "" then
 					ns = ns_prefixes[ns]; 
 					if ns then 
 						attr[ns..":"..nm] = attr[k];
@@ -105,7 +105,7 @@
 		end
 		function xml_handlers:EndElement(tagname)
 			local curr_ns,name = tagname:match("^([^\1]*)\1?(.*)$");
-			if not name then
+			if name == "" then
 				curr_ns, name = "", curr_ns;
 			end
 			if (not stanza) or (#stanza.last_add > 0 and name ~= stanza.last_add[#stanza.last_add].name) then