escape
Produce a copy of a string in which the characters '+', '%', '=', ';' and control characters are replaced with "%hh". This is a gentle form of URL encoding, attempting to cause as little distortion to the string as possible. The characters '=' and ';' are meta characters in cookies. By convention, they are escaped using the URL-encoding. This is only a convention, not a standard. Often, cookies are expected to have encoded values. We encode '=' and ';' because we must. We encode '%' and '+' because they are meta characters in URL encoding.
Return
The escaped result.
Parameters
string
The source string.