Applied patch provided by Taku Sano fixing the compression errors.

This commit is contained in:
John Resig 2006-08-13 01:29:27 +00:00
parent 6a47e28340
commit 8aca450f43
2 changed files with 7 additions and 6 deletions

View file

@ -210,16 +210,17 @@ jQuery.extend({
// If an array was passed in, assume that it is an array
// of form elements
if ( a.constructor == Array )
if ( a.constructor == Array ) {
// Serialize the form elements
for ( var i = 0; i < a.length; i++ )
s.push( a[i].name + "=" + encodeURIComponent( a[i].value ) );
// Otherwise, assume that it's an object of key/value pairs
else
} else {
// Serialize the key/values
for ( var j in a )
s.push( j + "=" + encodeURIComponent( a[j] ) );
}
// Return the resulting serialization
return s.join("&");