aboutsummaryrefslogtreecommitdiffstats
path: root/core/xmlhandlers.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-11-29 18:29:19 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-11-29 18:29:19 +0500
commitee490c5eabc83cb65e8fb2d83590fb62ba0c1140 (patch)
tree81fb5f90836938c9bff311d363840f11b62bb71f /core/xmlhandlers.lua
parent513d6dfa4aaf3a68d89c4ecb150c3a89f25f8539 (diff)
parentbeb6fa2f210bbf8ea8d976f11728d20c5b41ad42 (diff)
downloadprosody-ee490c5eabc83cb65e8fb2d83590fb62ba0c1140.tar.gz
prosody-ee490c5eabc83cb65e8fb2d83590fb62ba0c1140.zip
Merge with 0.6.
Diffstat (limited to 'core/xmlhandlers.lua')
-rw-r--r--core/xmlhandlers.lua6
1 files changed, 3 insertions, 3 deletions
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