יחידה:SanitizeParams
מראה
ניתן ליצור תיעוד על היחידה הזאת בדף יחידה:SanitizeParams/תיעוד
local base64 = require( 'Module:Base64' )
function verifyParams( frame )
local templateDataBlob = frame.args['templatedata']
local template = frame.args['template']
local result = 'רק base64\n<pre>' .. base64.decode( templateDataBlob ) .. '</pre>'
result = result .. 'עם uridecode\n<pre>' .. base64.decode( templateDataBlob, true ) .. '</pre>'
result = result .. 'עם uridecode וגם jsondecode\n<pre>' .. mw.dumpObject( base64.decode( templateDataBlob, true, true ) ) .. '</pre>'
return result
-- local templateData = base64.decode( templateDataBlob, true, true ) -- decode base64, uridecode, and finaly json.
-- return mw.dumpObject( templateData )
end -- function verifyParams
return { ["בדיקת-פמטרים"] = verifyParams,
["verifyParams"] = verifyParams }