If your data has characters that aren't allowed in urls, you should url encode it.
The following characters are either reserved (like &) or just present the possibility of confusing code. If your data contains these characters, urlencode it. Remember if you are using any extended ascii characters, unicode characters or non-printable characters you should url-encode your data.
- Dollar ("$")
- Ampersand ("&")
- Plus ("+")
- Comma (",")
- Forward slash/Virgule ("/")
- Colon (":")
- Semi-colon (";")
- Equals ("=")
- Question mark ("?")
- 'At' symbol ("@")
- Space
- Quotation marks
- 'Less Than' symbol ("<")
- 'Greater Than' symbol (">")
- 'Pound' character ("#")
- Percent character ("%")
- Left Curly Brace ("{")
- Right Curly Brace ("}")
- Vertical Bar/Pipe ("|")
- Backslash ("\")
- Caret ("^")
- Tilde ("~")
- Left Square Bracket ("[")
- Right Square Bracket ("]")
- Grave Accent ("`")
More info can be found here: http://www.blooberry.com/indexdot/html/topics/urlencoding.htm