From 05fbcb767cf2131b62d0dd9a7f0e536e72427d0d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sat, 18 Apr 2009 04:06:41 +0100 Subject: core.xmlhandlers: expat is the XML parser, not us. Don't reject valid XML. --- core/xmlhandlers.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua index 1409a1ec..67a0829d 100644 --- a/core/xmlhandlers.lua +++ b/core/xmlhandlers.lua @@ -57,7 +57,7 @@ function init_xmlhandlers(session, stream_callbacks) 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 @@ function init_xmlhandlers(session, stream_callbacks) 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 -- cgit v1.2.3