X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fxmlhandlers.lua;h=82c2d0b8d02361e95350d1f7c662225baf9d9149;hb=4341e61cc1ca8384a0ca18bad7f8f8f3f1c894b0;hp=d679af973798b605a4b590659ecd3ceab319f038;hpb=c435d0bd7afd6d625a5073cc35a2cc9500bdaf21;p=prosody.git diff --git a/core/xmlhandlers.lua b/core/xmlhandlers.lua index d679af97..82c2d0b8 100644 --- a/core/xmlhandlers.lua +++ b/core/xmlhandlers.lua @@ -50,7 +50,7 @@ function init_xmlhandlers(session, stream_callbacks) chardata = {}; end local curr_ns,name = tagname:match("^([^\1]*)\1?(.*)$"); - if not name then + if name == "" then curr_ns, name = "", curr_ns; end @@ -63,7 +63,7 @@ function init_xmlhandlers(session, stream_callbacks) local k = attr[i]; attr[i] = nil; local ns, nm = k:match("^([^\1]*)\1?(.*)$"); - if ns and nm then + if nm ~= "" then ns = ns_prefixes[ns]; if ns then attr[ns..":"..nm] = attr[k]; @@ -105,7 +105,7 @@ function init_xmlhandlers(session, stream_callbacks) end function xml_handlers:EndElement(tagname) local curr_ns,name = tagname:match("^([^\1]*)\1?(.*)$"); - if not name then + if 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