jquery-address icon indicating copy to clipboard operation
jquery-address copied to clipboard

Allow for query strings starting with "&" instead of "?"

Open marcn opened this issue 12 years ago • 1 comments

I know that the RFC's state that a query string in a URL "must" be indicated by a "?" but unfortunately servers have not taken this rule to heart and will allow for URLs using "&" to indicate the start of the query string. For example, instead of:

http://foo.com?arg1=val1&arg2=val2

Many servers will accept the following URL to be equivalent:

http://foo.com&arg1=val1&arg2=val2

Unfortunately jQuery Address only looks for "?" when finding the query string and so the URLs using the non-standard format will not have their query string split out. It seems like it would be a pretty easy change to the "queryString" function to first look for "?" to split on, and if it doesn't find one look for a "&" as well.

marcn avatar Apr 09 '12 21:04 marcn

Why not stop providing links with an invalid format? Seems like you're asking for trouble from more places than jquery.address... .

b9chris avatar Sep 29 '12 18:09 b9chris