Fixes jQuery.fragments cache and adds tests. Fixes #10682

This commit is contained in:
Rick Waldron
2011-11-05 23:04:09 -04:00
parent 8380e12ab4
commit 92c8404012
2 changed files with 49 additions and 1 deletions

View File

@@ -480,7 +480,7 @@ jQuery.buildFragment = function( args, nodes, scripts ) {
// Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
first.charAt(0) === "<" && !rnocache.test( first ) &&
(jQuery.support.checkClone || !rchecked.test( first )) &&
(jQuery.support.checkClone || !rchecked.test( first )) ||
(!jQuery.support.unknownElems && rnoshimcache.test( first )) ) {
cacheable = true;