Make sure that we don't try to double-encode params using the traditional style. Fixes #6041.

This commit is contained in:
jeresig 2010-02-05 19:43:31 -05:00
parent 43b3ed086d
commit 54bd004e53
2 changed files with 5 additions and 3 deletions

View file

@ -624,7 +624,7 @@ jQuery.extend({
// If traditional, encode the "old" way (the way 1.3.2 or older
// did it), otherwise encode params recursively.
for ( var prefix in a ) {
buildParams( prefix, a[prefix] );
buildParams( traditional ? prefix : prefix.replace(/[\[\]]/g, ""), a[prefix] );
}
}