Software /
code /
prosody
Diff
core/xmlhandlers.lua @ 1058:63b7a81d45eb
Automated merge with http://waqas.ath.cx:8000/
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 23 Apr 2009 21:06:51 +0100 |
parent | 1051:0327c569eb1a |
child | 1153:1184cb19b6f2 |
line wrap: on
line diff
--- a/core/xmlhandlers.lua Fri Apr 24 00:38:40 2009 +0500 +++ b/core/xmlhandlers.lua Thu Apr 23 21:06:51 2009 +0100 @@ -57,7 +57,11 @@ stanza:text(t_concat(chardata)); chardata = {}; end - local curr_ns,name = tagname:match("^(.+)|([^%|]+)$"); + local curr_ns,name = tagname:match("^(.-)|?([^%|]-)$"); + if not name then + curr_ns, name = "", curr_ns; + end + if curr_ns ~= stream_default_ns then attr.xmlns = curr_ns; end @@ -109,7 +113,10 @@ end end function xml_handlers:EndElement(tagname) - curr_ns,name = tagname:match("^(.+)|([^%|]+)$"); + curr_ns,name = tagname:match("^(.-)|?([^%|]-)$"); + if not name then + curr_ns, name = "", curr_ns; + end 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