Diff

core/xmlhandlers.lua @ 1013:943f2cd7e480

Merging stable into unstable
author Matthew Wild <mwild1@gmail.com>
date Mon, 20 Apr 2009 03:03:07 +0100
parent 1003:afae75e37ceb
child 1051:0327c569eb1a
line wrap: on
line diff
--- a/core/xmlhandlers.lua	Wed Apr 15 00:21:40 2009 +0100
+++ b/core/xmlhandlers.lua	Mon Apr 20 03:03:07 2009 +0100
@@ -57,7 +57,7 @@
 				stanza:text(t_concat(chardata));
 				chardata = {};
 			end
-			local curr_ns,name = tagname:match("^(.+)|([%w%-]+)$");
+			local curr_ns,name = tagname:match("^(.+)|([^%|]+)$");
 			if curr_ns ~= stream_default_ns then
 				attr.xmlns = curr_ns;
 			end
@@ -109,7 +109,7 @@
 			end
 		end
 		function xml_handlers:EndElement(tagname)
-			curr_ns,name = tagname:match("^(.+)|([%w%-]+)$");
+			curr_ns,name = tagname:match("^(.+)|([^%|]+)$");
 			if (not stanza) or (#stanza.last_add > 0 and name ~= stanza.last_add[#stanza.last_add].name) then 
 				if tagname == stream_tag then
 					if cb_streamclosed then