Limit domManip caching to strings < 512 characters long. Ticket #4883.
authorJohn Resig <jeresig@gmail.com>
Sat, 11 Jul 2009 14:50:59 +0000 (14:50 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 11 Jul 2009 14:50:59 +0000 (14:50 +0000)
src/manipulation.js

index 62009be..b026672 100644 (file)
@@ -140,7 +140,7 @@ jQuery.fn.extend({
                var fragment, scripts, cacheable, cached, cacheresults, first;
 
                if ( this[0] ) {
-                       if ( args.length === 1 && typeof args[0] === "string" ) {
+                       if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 ) {
                                cacheable = true;
                                cacheresults = jQuery.fragments[ args[0] ];
                                if ( cacheresults ) {