URLDecode
Converts URL-safe text to its original format by substituting 'safe' characters with their 'unsafe' equivalents.
Text converted using this function can be reverted to its 'safe' state using the URLEncode function.
Syntax
URLDecode( StringValue );
Parameters
| Parameter Name | Type | Description | Optional? | Default Value |
|---|---|---|---|---|
| StringValue | String | The string to decode. | No | n/a |
StringInput is a string containing the text you want to convert.
Output
A string consisting of the converted text.
Use Case
Values extracted from the query string of a URL will be in a URL-safe format. Take for example the following URL, whose query string includes a single item named referrer:
http://www.myexamplewebsite.com/?referrer=Smith+Johnson+%26+Partners
In the example above, the value assigned to referrer includes characters that will need to be decoded for it to be fully human-readable. Using the GetQueryStringItem function to fetch the value of referrer results in the following string:
Smith+Johnson+%26+Partners
This string is assigned to the EncodedQueryItem variable. From there, there it can be decoded using the following expression:
DecodedQueryItem:= URLDecode( EncodedQueryItem );
The result of this expression, which is passed to DecodedQueryItem, is as follows:
Smith Johnson & Partners