Should null be passed in query strings generated by jQuery.param?
Currently,
- jQuery.param({"foo":null})
returns
- "foo=null"
On the server, this gets treated as the string "null", even though a string was not passed in.
I think that it would be a good idea to return this instead:
- "foo="
which is at least closer to null.
The patch would be to change
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
into
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value === null ? "" : value );