Permanently protected module
From Wikipedia, the free encyclopedia


local p = {}



function p.urlDecode( frame )

	local enctype = frame.args2

	local ret = nil;

	if (frame.args2 ~= nil) then

		enctype = mw.ustring.upper(enctype)

		if ((enctype == "QUERY") or (enctype == "PATH") or (enctype == "WIKI")) then

			ret = mw.uri.decode(frame.args1],frame.args2])

		end

	else

		ret = mw.uri.decode(frame.args1])

	end

	ret = string.gsub(ret, "{", "{")

	ret = string.gsub(ret, "}", "}")



	return ret

end



return p