Changeset

1003:afae75e37ceb

core.xmlhandlers: expat is the XML parser, not us. Don't reject valid XML.
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 Apr 2009 04:06:41 +0100
parents 1002:5265657d7c12
children 1004:0c3ea09d6d6e
files core/xmlhandlers.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/core/xmlhandlers.lua	Fri Apr 17 16:16:17 2009 +0100
+++ b/core/xmlhandlers.lua	Sat Apr 18 04:06:41 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