aboutsummaryrefslogtreecommitdiffstats
path: root/util/xml.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/xml.lua')
-rw-r--r--util/xml.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/xml.lua b/util/xml.lua
index 076490fa..88ccedde 100644
--- a/util/xml.lua
+++ b/util/xml.lua
@@ -11,6 +11,7 @@ local parse_xml = (function()
local ns_separator = "\1";
local ns_pattern = "^([^"..ns_separator.."]*)"..ns_separator.."?(.*)$";
return function(xml)
+ --luacheck: ignore 212/self
local handler = {};
local stanza = st.stanza("root");
function handler:StartElement(tagname, attr)
@@ -26,8 +27,8 @@ local parse_xml = (function()
attr[i] = nil;
local ns, nm = k:match(ns_pattern);
if nm ~= "" then
- ns = ns_prefixes[ns];
- if ns then
+ ns = ns_prefixes[ns];
+ if ns then
attr[ns..":"..nm] = attr[k];
attr[k] = nil;
end
@@ -38,7 +39,7 @@ local parse_xml = (function()
function handler:CharacterData(data)
stanza:text(data);
end
- function handler:EndElement(tagname)
+ function handler:EndElement()
stanza:up();
end
local parser = lxp.new(handler, "\1");