$.param executes functions

$.param executes functions


When upgrading from jQuery 1.2.3 to 1.3.2 I noticed that $.param have
started to throw errors. The reason is that $.param has started to
execute functions instead of converting them to an URI encoded String:
jQuery.isFunction(a[j]) ? a[j]() : a[j]
One of the objects I'm converting has a few helper methods that
requires arguments. They fail since $.param executes them without
arguments. To reproduce the error:
$j.param({crash:function(obj){ var t = obj.prop }});
Should it be an option to disable/enable function serializing or
stripping away the functions?
Maybe add exception handling when executing the functions so it
doesn't produce the error?
I don't mind creating a patch if I can get some feedback on the
questions above.
For now, I'm cloning the object and stripping away functions.
I took the liberty of updating these pages about the change:
http://docs.jquery.com/Utilities/jQuery.param
http://docs.jquery.com/Release:jQuery_1.3#Changes
Regards,
Gregers Gram Rygg