Template:Urldecode
Jump to navigation
Jump to search
[edit] [ ] Template documentation
This documentation is transcluded from Template:Urldecode/doc. (edit | history)
Editors can experiment in this template's sandbox (create) and test cases (create) pages.
Subpages of this template.
Editors can experiment in this template's sandbox (create) and test cases (create) pages.
Subpages of this template.
Description
As documented by mw:Help:Magic words#URL data, {{urlencode:x:y/z á é}}
transforms this into x%3Ay%2Fz+%C3%A1+%C3%A9, a percent-encoded string safe for web searches. However, there is no built-in reversal.
This template is a wrapper around a Lua function that reverses this process.
Usage
{{Urldecode|string}}
Example
Notice the asymmetry: encoding uses a colon, whereas decoding uses a pipe:
{{urldecode|x%3Ay%2Fz+%C3%A1+%C3%A9}}
→ x:y/z á é