aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-02-08 11:31:13 -0500
committerjeresig <jeresig@gmail.com>2010-02-08 11:31:13 -0500
commitfec02aa5cb01fc865c69120d88a2eed541a21f0e (patch)
tree6cf1ed5f40fc0e4aa2b0fe0881232d97acfffee4 /src
parent75bb2d6e510a3c048a42ce673e9655fa779eacd5 (diff)
parent3c5b1ca03ba6ca8504e7ba1c61c4d639814f4233 (diff)
downloadjquery-fec02aa5cb01fc865c69120d88a2eed541a21f0e.tar.gz
jquery-fec02aa5cb01fc865c69120d88a2eed541a21f0e.zip
Merge branch 'master' of github.com:jquery/jquery
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js4
-rw-r--r--src/attributes.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/ajax.js b/src/ajax.js
index f514caee7..3c19ad6c7 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -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( traditional ? prefix : prefix.replace(/[\[\]]/g, ""), a[prefix] );
+ buildParams( prefix, a[prefix] );
}
}
@@ -635,7 +635,7 @@ jQuery.extend({
if ( jQuery.isArray(obj) ) {
// Serialize array item.
jQuery.each( obj, function( i, v ) {
- if ( traditional ) {
+ if ( traditional || /\[\]$/.test( prefix ) ) {
// Treat each array item as a scalar.
add( prefix, v );
} else {
diff --git a/src/attributes.js b/src/attributes.js
index b22acba03..d217793cc 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -330,7 +330,7 @@ jQuery.extend({
}
// elem is actually elem.style ... set the style
- // Using attr for specific style information is now deprecated. Use style insead.
+ // Using attr for specific style information is now deprecated. Use style instead.
return jQuery.style( elem, name, value );
}
});