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

Encoding querystring

Open amnesia7 opened this issue 11 years ago • 0 comments

I have a GET form that I'm entering foo, bar in a field.

This generates a string of text (foo%2C+bar) for a parameter in the querystring.

I'm then using ajax-enabled links to paginate through the form results.

After clicking the paginate link the address then becomes foo%252C%2Bbar.

Is this normal?

At the moment I'm having to do the following but I'm sure I shouldn't need to because if I follow the links without javascript they stay correct:

var href = $(this).attr('href');
href.split('?');
// decode querystring of ajax-powered links
$.address.value(href.split('?')[0] + '?' + decodeURIComponent(href.split('?')[1]));

Hopefully someone can offer an explanation.

I'm using Chrome if that makes any difference.

amnesia7 avatar Nov 06 '13 22:11 amnesia7