EscapeUtil
Introduction
Escape and Unescape utility class, EscapeUtil, for encoding and decoding strings using the ISO Latin character set. All whitespace characters, punctuation, special characters, and other non-ASCII characters are converted to %xx-formatted character encodings (where xx corresponds to the 16-bit hexadecimal representation of the character’s position in the character set table).
The methods in this class correspond to the escape()
and unescape()
functions found in Javascript.
Methods
EscapeUtil.escape
- Performs Escape encoding (Unicode). This method does not encode ASCII letters, numbers, or the following ASCII punctuation marks: * @ - _ + . /. All other characters are replaced with their corresponding escape sequences.EscapeUtil.unescape
- Performs Escape decoding.EscapeUtil.safeUnescape
- Safely unescapes text, returning the original text if it was not previously escaped.