percentescape(
percentescape(
TEXT
,
ESCAPELIST
)

The percentescape( function encodes specified characters using percent encoding.

Parameters

This function has two parameters:

text – is the item of text that you want to encode.

escapelist – specifies what characters should be encoded using percentage notation. (Note: Normally, the first character specified should be the % character.).

Description

The percentescape( function encodes specified characters using percent encoding. You specify exactly what kinds of characters you want to be escaped. In this example three characters will be escaped: percent signs, commas and spaces.

    percentescape("red, green, blue","%, ") ☞ red%2C%20green%2C%20blue

See Also

- percentunescape( -- decodes text that contains percent encoding.
- strip( -- strips off leading and trailing blanks and other whitespace (carriage returns, tabs, etc.)
- stripchar( -- extracts characters you don't want from a text item.
- stripdiacriticals( -- strips diacritical marks from text.
- stripprintable( -- strips non-printable characters from text.
- striptoalpha( -- removes everything but alphabetic letters from a text item.
- striptonum( -- removes everything but numeric digits from a text item.
- urldecode( -- decodes text that contains percent encoded characters.
- urlencode( -- converts text into a legal URL (by converting spaces into `%20`). WARNING: THIS FUNCTION IS OBSOLETE.

History

Version | Status | Notes
10.0 | New | New in this version.