URL decoding: Difference between revisions
Content deleted Content added
added Factor |
|||
Line 1,270:
=={{header|UNIX Shell}}==
<lang bash>urldecode() { local u="${1//+/ }"; printf '%b' "${u//%/\\x}"; }</lang>
Example:
<lang bash>urldecode http%3A%2F%2Ffoo%20bar%2F
http://foo bar/</lang>
<lang bash>
{{works with|bash}}
{{works with|ksh}}
<lang bash>function urldecode
|