Strangely enough, anytime I have an & in an HREF to indicate querystring parameters I receive the following error on the Blackberry Curve:
Error encountered during XML parse: expecting ';'.
Is there any way to get it to accept & in querystrings? Other mobile browsers don’t like the ; to separate querystring parameters.
NOTE: I am using ASP.NET 2.0 if that makes a difference.
Blackberry is (for once) correct. Your code is not valid XML (or HTML), as the Validator will confirm.
Yes, the same way you get an ampersand into any attribute value or text content. HTML-encode it.
That’s a server-side issue rather than a browser issue. Whilst the HTML4 spec recommends that servers accept
;as an alternative separator character to&, precisely to avoid the annoyance of having to write&so much, sadly not all servers actually allow this.