Module:Urldecode: Difference between revisions
Jump to navigation
Jump to search
m (Protected "Module:Urldecode": High-risk template or module: 3861 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 16:36, 26 March 2024
Documentation for this module may be created at Module:Urldecode/doc
local p = {} function p.urlDecode( 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 p