Module:Check for unknown parameters: Difference between revisions

fix odd bug for | = which gets stripped to nothing, and Category:Foo is broken
m (Protected Module:Check for unknown parameters: Highly visible page ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
(fix odd bug for | = which gets stripped to nothing, and Category:Foo is broken)
Line 46:
if( (not knownflag) and ( (not ignoreblank) or (ignoreblank and isnotempty(v)) ) ) then
k = mw.ustring.gsub(k, '[^%w\-_ ]', '?')
local r = mw.ustring.gsub(unknown, '_VALUE_ ', k)
table.insert(res, r)
table.insert(comments, '"' .. k .. '"')
Line 52:
elseif(checkpos and type(k) == 'number' and knownargs[tostring(k)] == nil) then
if( (not ignoreblank) or (ignoreblank and isnotempty(v)) ) then
local r = mw.ustring.gsub(unknown, '_VALUE_ ', k)
table.insert(res, r)
table.insert(comments, '"' .. k .. '"')
Anonymous user