Module:Check for unknown parameters: Difference between revisions

clobber non-alphanumeric
m>Frietjes
No edit summary
m>Frietjes
(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)
Anonymous user