Landing pull request 365. jQuery.buildFragment, ensure doc is a document; Fixes #8950.

More Details:
 - https://github.com/jquery/jquery/pull/365
 - http://bugs.jquery.com/ticket/8950
This commit is contained in:
Rick Waldron 2011-05-13 12:26:17 -04:00 committed by timmywil
commit ec829431fe
2 changed files with 27 additions and 4 deletions

View file

@ -1393,7 +1393,7 @@ test("jQuery.buildFragment - no plain-text caching (Bug #6779)", function() {
}
catch(e) {}
}
equals($f.text(), bad.join(""), "Cached strings that match Object properties");
equals($f.text(), bad.join(""), "Cached strings that match Object properties");
$f.remove();
});
@ -1421,3 +1421,13 @@ test( "jQuery.html - execute scripts escaped with html comment or CDATA (#9221)"
'</script>'
].join ( "\n" ) ).appendTo( "#qunit-fixture" );
});
test("jQuery.buildFragment - plain objects are not a document #8950", function() {
expect(1);
try {
jQuery('<input type="hidden">', {});
ok( true, "Does not allow attribute object to be treated like a doc object");
} catch (e) {}
});