Changeset 8722
- Timestamp:
- 01/25/08 18:54:22 (9 months ago)
- Files:
-
- spinoffs/prototype/trunk/CHANGELOG (modified) (1 diff)
- spinoffs/prototype/trunk/src/form.js (modified) (1 diff)
- spinoffs/prototype/trunk/test/unit/form.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spinoffs/prototype/trunk/CHANGELOG
r8721 r8722 1 1 *SVN* 2 3 * Roll back the fix for #9609, since it does not work in Opera. Instead, avoid using "valueOf" or "toString" as field names in forms. 2 4 3 5 * Prevent DOM node expandos _countedByPrototype and _prototypeEventID from being serialized into (inner|outer)HTML in IE. Closes #10909. [dcpedit, Tobie Langel, Andrew Dupont] spinoffs/prototype/trunk/src/form.js
r8713 r8722 15 15 if (value != null && (element.type != 'submit' || (!submitted && 16 16 submit !== false && (!submit || key == submit) && (submitted = true)))) { 17 if (key in result && !Object.isFunction(result[key])) {17 if (key in result) { 18 18 // a key is already present; construct an array of values 19 19 if (!Object.isArray(result[key])) result[key] = [result[key]]; spinoffs/prototype/trunk/test/unit/form.html
r8713 r8722 126 126 </form> 127 127 128 <form id="trouble_form">129 <input type="text" name="length" value="foo" />130 <input type="text" name="toString" value="55" />131 <input type="text" name="valueOf" value="bar" />132 </form>133 128 </div> 134 129 … … 408 403 $('form').serialize({ submit: 'inexistent' })); 409 404 410 // try to serialize form containing toString, valueOf and length -named elements411 assertHashEqual({ length: 'foo', toString: 55, valueOf: 'bar' },412 $('trouble_form').serialize(true));413 405 }}, 414 406