Fixed ajax array arguments in $.param

This commit is contained in:
Sean Catchpole 2007-07-26 00:27:56 +00:00
parent f8b00051c3
commit 8a80d05a44

View File

@ -794,7 +794,7 @@ jQuery.extend({
// If the value is an array then the key names need to be repeated
if ( a[j] && a[j].constructor == Array )
jQuery.each( a[j], function(){
s.push( encodeURIComponent(j) + "=" + encodeURIComponent( this ) );
s.push( encodeURIComponent(j) + "[]=" + encodeURIComponent( this ) );
});
else
s.push( encodeURIComponent(j) + "=" + encodeURIComponent( a[j] ) );