Module:Check for unknown parameters: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
No edit summary
(clobber non-alphanumeric)
Line 28: Line 28:
for k,v in pairs(pargs) do
for k,v in pairs(pargs) do
if (knownargs[k] == nil and type(k) == 'string') then
if (knownargs[k] == nil and type(k) == 'string') then
k = mw.ustring.gsub(k, '[^%w\-_ ]', '?')
local r = mw.ustring.gsub(unknown, '_VALUE_', k)
local r = mw.ustring.gsub(unknown, '_VALUE_', k)
table.insert(res, r)
table.insert(res, r)