This is my understanding of how escaping done in URL (or known as URL Encoding).
A related and often mentioned is application/x-www-form-urlencoded from HTML 4.01 Specification.
Quote from HTML 4.01 Spec:
Unreserved character comparison.
Character | RFC 3986 | RFC 2396 | RFC 1738 | application/x-www-form-urlencoded |
---|---|---|---|---|
A-Z | ∨ | ∨ | ∨ | ∨ |
a-z | ∨ | ∨ | ∨ | ∨ |
0-9 | ∨ | ∨ | ∨ | ∨ |
exclamation point (! ) | ∨ | ∨ | ? | |
dollar ($ ) | ∨ | ? | ||
single quote ( ') | ∨ | ∨ | ? | |
opening parenthesis (( ) | ∨ | ∨ | ? | |
closing parenthesis () ) | ∨ | ∨ | ? | |
asterisk (* ) | ∨ | ∨ | ? | |
plus (+ ) | ∨ | ? | ||
comma (, ) | ∨ | ? | ||
hyphen (- ) | ∨ | ∨ | ∨ | ? |
period (. ) | ∨ | ∨ | ∨ | ? |
underscore (_ ) | ∨ | ∨ | ∨ | ? |
tilde (~ ) | ∨ | ∨ | ? |