Módulo:Urldecode

De Enciclopedia de conocimiento de la Iglesia de Dios
Revisión del 02:13 26 abr 2023 de Pyc1948 (discusión | contribs.) (Página creada con «-- This function allows to translate the percent-encoding of web links and texts local z = {} function z.decode(frame) local enctype = frame.args[2] local ret = nil; if (frame.args[2] ~= nil) then enctype = mw.ustring.upper(enctype) if ((enctype == "QUERY") or (enctype == "PATH") or (enctype == "WIKI")) then ret = mw.uri.decode(frame.args[1],frame.args[2]) end else ret = mw.uri.decode(frame.args[1]) end ret = string.gsub(ret, "{", "{") ret = s…»)
(difs.) ← Revisión anterior | Revisión actual (difs.) | Revisión siguiente → (difs.)
Ir a la navegación Ir a la búsqueda

La documentación para este módulo puede ser creada en Módulo:Urldecode/doc

-- This function allows to translate the percent-encoding of web links and texts

local z = {}

function z.decode(frame)
	local enctype = frame.args[2]
	local ret = nil;
	if (frame.args[2] ~= nil) then
		enctype = mw.ustring.upper(enctype)
		if ((enctype == "QUERY") or (enctype == "PATH") or (enctype == "WIKI")) then
			ret = mw.uri.decode(frame.args[1],frame.args[2])
		end
	else
		ret = mw.uri.decode(frame.args[1])
	end
	ret = string.gsub(ret, "{", "{")
	ret = string.gsub(ret, "}", "}")

	return ret
end

return z