jquery query parameter parsing – “=” in query string breaks query string up

I’m trying to parse parameters from a query string using this jquery plugin and this sample query string:

http://test.com/?xnJTqqWEclJnnPEvWH&cid=3DF3-00-=63-D4-DA-2F-91-6B-39-39-75-E4-C1-B7-28-12&mid=3D93-36-14-46-4D-52-9E-48-17-=6A-50-13-56-FA-0A-06&PROMO_MONTH=3D201106

Using the code for the plugin:

console.log($  .getQueryParam( "cid" ));

The cid gets divided at the first instance of the “=” sign – so instead of:

3DF3-00-=63-D4-DA-2F-91-6B-39-39-75-E4-C1-B7-28-12

I get

3DF3-00-

Is this normal behavior? Does the equals sign do something in particular in this query string? If not, how do I parse this query string so that I get the entire parameter?

newest questions tagged jquery – Stack Overflow

About Admin