Module:DecodeEncode

local p = {}

function p.decode( frame ) local s	local scope

s = frame.args['s'] scope = frame.args['decodeNamedEntities'] if s ~= nil then else s= '?BLANK&amp;!' end --scope = frame.args[decodeNamedEntities]

-- 	p._decode ( s, scope ) -- end

-- function p._decode( s, scope ) local ret = nil;

if scope ~= nil then if scope ~= false then scope = true else scope = false end else scope = false end local stext = 'unk' if scope==true then stext='T' else stext='F' end

ret = 's: ' .. s .. ' decode: ' .. mw.text.decode( s, true ) .. ' dNE: ' .. stext

return ret end

function p.encode( frame ) local ret = textEncode-todo

return ret end

return p