URLEncode
Overview
Returns the specified URL with spaces replaced with %20 or fully encodes all non-alphanumeric characters.Syntax
URLEncode(1, 2, 3)
| Ordinal | Type | Description | |
|---|---|---|---|
| 1 | string | Required | String containing the URL and attribute value |
| 2 | boolean | Value indicating how function handles illegal URL characters. A value of 0 replaces space in URL with %20. A value of 1 encodes any illegal characters used in URL, such as spaces or accented letters, in the query string of the given URL. This parameter defaults to 0. | |
| 3 | boolean | Value indicating how function encodes passed string values. A value of 0 encodes only portion of passed string following the ? character. A value of 1 encodes full passed string. This parameter defaults to 0. |
Usage
Example 1:
URLEncode('http://example.com?p=first name')
System returns:
http://example.com?p=first%20name
Example 2:
URLEncode('http://example.com?p=examplé',1,0)
System returns:
http://example.com?p%3dexampl%c3%a9
Example 3:
URLEncode('examplé',1,1)
System returns:
exampl%c3%a9