Reputation: 34690
Example:
http://foo.com/generatepdf.aspx?u=http://foo.com/somepage.aspx?color=blue&size=15
I added the iis tag because I am guessing it also depends on what server technology you use?
Upvotes: 7
Views: 3934
Reputation: 75
As reported in http://en.wikipedia.org/wiki/Query_string
W3C recommends that all web servers support semicolon separators in addition to ampersand separators (link reported on that wiki page) to allow application/x-www-form-urlencoded query strings in URLs within HTML documents without having to entity escape ampersands.
So, I suppose the answer to the question is yes and you have to change in a ";" semicolon the "&" ampersand usaully used for key=value separator.
Upvotes: 1
Reputation: 11696
Yes it can, as far as I can tell, according to RFC 3986: Uniform Resource Identifier (URI): Generic Syntax (from year 2005):
This is the BNF for the query string:
query = *( pchar / "/" / "?" )
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
The spec says:
(But I suppose your server framework might or might not follow the specification exactly.)
Upvotes: 0
Reputation: 179284
The server technology shouldn't make a difference.
When you pass a value to a query string you need to url encode the name/value pair. If you want to pass in a value that contains a special character such as a question mark (?) you'll just need to encode that character as %3F. If you then needed to recursively pass another query string to the encoded url, you'll need to double/triple/etc encode the url resulting in the original ? turning into %253F, %25253F, etc.
Upvotes: 3
Reputation: 83729
you'll probably want to UrlEncode the url that is in the query string.
Upvotes: 2