Module:Urldecode
Appearance
From Wikipedia, the free encyclopedia
Functions
- Function urlDecode reverses the transformation by magic word
{{urlencode:}}.
{{#invoke:Urldecode|urlDecode|C%C3%B4te+d%27Ivoire}}would produceCôte d'Ivoire
See also
- {{urldecode }}
- {{format linkr }}
The above documentation is transcluded from Module:Urldecode/doc. (edit | history)
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Subpages of this module.
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Subpages of this module.
localp={} functionp.urlDecode(frame) localenctype=frame.args[2] localret=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,"}","}") returnret end returnp