Fixes #7945. Make jQuery.param() serialize plain objects with a property named jquery correctly.

This commit is contained in:
Anton Kovalyov 2011-02-02 00:32:29 +01:00 committed by Anton M
parent fa4c90987f
commit fdd4101fe9
2 changed files with 7 additions and 2 deletions

View file

@ -698,7 +698,7 @@ jQuery.extend({
}
// If an array was passed in, assume that it is an array of form elements.
if ( jQuery.isArray( a ) || a.jquery ) {
if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
// Serialize the form elements
jQuery.each( a, function() {
add( this.name, this.value );