We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f2e209 commit ca6993fCopy full SHA for ca6993f
src/manipulation.js
@@ -266,8 +266,11 @@ jQuery.fn.extend({
266
// Make sure that the elements are removed from the DOM before they are inserted
267
// this can help fix replacing a parent with child elements
268
if ( !jQuery.isFunction( value ) ) {
269
- value = jQuery( value ).detach();
270
-
+ // API says a string is an HTML string, so evaling and
+ // detaching will only cause problems
271
+ if(typeof value !== 'string') {
272
+ value = jQuery(value).detach();
273
+ }
274
} else {
275
return this.each(function(i) {
276
var self = jQuery(this), old = self.html();
0 commit comments