Escaping is the process of applying an alternate meaning to a character or set of characters.
Escaping is used for many purposes, such as providing representations of unprintable characters, changing font colors in terminals, or allowing the inclusion in a string of a character normally used to terminate the string, as well as allowing to output a character to user when that character can be used as a control or markup character.
Some of the more common uses of escaping
- URL encoding to allow including characters such as
/
or?
, and others, in URL queries; - XML and HTML entities that can be used to encode special characters that, for example, would normally be used for markup purposes.