diff -r de2ae849b0b3 -r e33658f6052c core/xmlhandlers.lua --- a/core/xmlhandlers.lua Thu Nov 12 13:34:38 2009 +0500 +++ b/core/xmlhandlers.lua Thu Nov 12 13:42:44 2009 +0500 @@ -29,7 +29,6 @@ function init_xmlhandlers(session, stream_callbacks) local ns_stack = { "" }; - local curr_ns, name = ""; local curr_tag; local chardata = {}; local xml_handlers = {}; @@ -50,7 +49,7 @@ stanza:text(t_concat(chardata)); chardata = {}; end - local curr_ns,name = tagname:match("^(.-)|?([^%|]-)$"); + local curr_ns,name = tagname:match("^([^\1]*)\1?(.*)$"); if not name then curr_ns, name = "", curr_ns; end @@ -63,7 +62,7 @@ for i=1,#attr do local k = attr[i]; attr[i] = nil; - local ns, nm = k:match("^([^|]+)|?([^|]-)$") + local ns, nm = k:match("^([^\1]*)\1?(.*)$"); if ns and nm then ns = ns_prefixes[ns]; if ns then @@ -105,7 +104,7 @@ end end function xml_handlers:EndElement(tagname) - curr_ns,name = tagname:match("^(.-)|?([^%|]-)$"); + local curr_ns,name = tagname:match("^([^\1]*)\1?(.*)$"); if not name then curr_ns, name = "", curr_ns; end