Skip to content

Commit

Permalink
IE doesn't seem to like caching fragments that have options in them. …
Browse files Browse the repository at this point in the history
…Ticket #4883.
  • Loading branch information
jeresig committed Jul 11, 2009
1 parent 0c4418b commit 5b84c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manipulation.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jQuery.fn.extend({
var fragment, scripts, cacheable, cached, cacheresults, first; var fragment, scripts, cacheable, cached, cacheresults, first;


if ( this[0] ) { if ( this[0] ) {
if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 ) { if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 ) {
cacheable = true; cacheable = true;
cacheresults = jQuery.fragments[ args[0] ]; cacheresults = jQuery.fragments[ args[0] ];
if ( cacheresults ) { if ( cacheresults ) {
Expand Down

2 comments on commit 5b84c7c

@jdalton
Copy link
Member

@jdalton jdalton commented on 5b84c7c Sep 1, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you remember any more details about this? Was the issue only if it was a single element or within other elements ?

@dmethvin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the same issue dealt with in jQuery.clean? IE doesn't like bare elements to be assigned to innerHTML so they're wrapped in a which is later stripped.

Please sign in to comment.