Module:Sortkey
local getArgs = require('Module:Arguments').getArgs
local p = {}
function p._encode(sortkey) -- Protect against sortkey nesting. -- Example: Template:Sort if string.find(sortkey, "sortkey") or string.find(sortkey, "data-sort-value") then return ""; end
return mw.text.encode(sortkey)
end
function p.encode(frame) local args = getArgs(frame); return p._encode(args[1] or "") end
return p