Module:DecodeEncode

local p = {}

function p.decode( frame ) local str local scope = true

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

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

-- function p._decode( s2, scope2 ) local ret = nil;

if frame.args[decodeNamedEntities] ~= nil then if frame.args[decodeNamedEntities] ~= 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 = 'RET str: ' .. str .. ' decode: ' .. mw.text.decode( str, true ) .. ' dNE: ' .. stext

return ret end

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

return ret end

return p