URL Encoding
From LongJump Support Wiki
Revision as of 22:47, 1 February 2012 by imported>Aeric
Note:
When specifying a URL in code, any special characters (characters other than letters and numbers) need to be encoded. For example, a space character is encoded as %20.(Browsers typically take care of encoding URLs entered into the address bar--so the URL displayed after visiting a page may differ somewhat from the one that was initially entered.)
Here are some typical encodings:
space
+
%%20
%2B
%25
So:
Instead of Use & (A&B)
space (A B)%26 (A%26B)
%20 (A%20B)
Learn more:
- URL Encoding in HTML
- Encode a URL in JavaScript
- URLEncoder class for Java