xmlhandlers: Remove numeric attributes
[prosody.git] / core / xmlhandlers.lua
index 573a9604ed7ca5c045d50ef4495d186d95ac66fb..a71fc40fef8558c474e14ed26e4fea47e0abdc7f 100644 (file)
@@ -60,13 +60,14 @@ function init_xmlhandlers(session, stream_callbacks)
                        end
                        
                        -- FIXME !!!!!
-                       for i, k in ipairs(attr) do
+                       for i=1,#attr do
+                               local k = attr[i];
+                               attr[i] = nil;
                                local ns, nm = k:match("^([^|]+)|?([^|]-)$")
                                if ns and nm then
                                        ns = ns_prefixes[ns]; 
                                        if ns then 
                                                attr[ns..":"..nm] = attr[k];
-                                               attr[i] = ns..":"..nm;
                                                attr[k] = nil;
                                        end
                                end