aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-04-18 04:06:41 +0100
committerMatthew Wild <mwild1@gmail.com>2009-04-18 04:06:41 +0100
commit05fbcb767cf2131b62d0dd9a7f0e536e72427d0d (patch)
tree650f35a0f216db097aded9a337654c0211258dec
parentf28ce3ccacbf3be4c51b22798eabb2770e3a7e81 (diff)
downloadprosody-05fbcb767cf2131b62d0dd9a7f0e536e72427d0d.tar.gz
prosody-05fbcb767cf2131b62d0dd9a7f0e536e72427d0d.zip
core.xmlhandlers: expat is the XML parser, not us. Don't reject valid XML.
-rw-r--r--core/xmlhandlers.lua4
1 files 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