Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add jQuery.isPlainObject check to ensure constructed property values are not misinterpretted as objects. Fixes #10466 #540

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Member

rwaldron commented Oct 10, 2011

Add jQuery.isPlainObject check to ensure constructed property values are not misinterpretted as objects. Fixes #10466

http://bugs.jquery.com/ticket/10466

@rwaldron rwaldron Add jQuery.isPlainObject check to ensure constructed property values …
…are not misinterpretted as objects. Fixes #10466
18cd110

This isn't likely to be a perf-critical path, so isPlainObject alone would be shorter. Also, all other constructed non-plain objects (e.g., Date) will now be stringified in param() by encodeURIComponent, dunno if that changes their behavior as well.

Hmm, seems like the obj != null test is redundant if we use isPlainObject.

do you need the extra parens? aren't these all AND'ed?

Owner

rwaldron replied Oct 14, 2011

Why are you reviewing the first commit and not the latest?

Why are you reviewing the first commit and not the latest?

@rwldrn, Because I'm a jerk.

Owner

rwaldron replied Oct 14, 2011

hahahah hilarious :)

Member

rwaldron commented Oct 10, 2011

I'll test that and update the branch

Owner

dmethvin commented Dec 6, 2011

Landed. 166b9d2

@dmethvin dmethvin closed this Dec 6, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment