Fix #2184 by using the jQuery.clean() function instead of a direct innerHTML assignment in the clone() function for IE.

This commit is contained in:
David Serduke 2008-01-23 03:54:23 +00:00
parent e7fef859f1
commit 1faed11e3c
2 changed files with 15 additions and 5 deletions

View file

@ -303,11 +303,9 @@ jQuery.fn = jQuery.prototype = {
// as properties will not be copied (such as the
// the name attribute on an input).
var clone = this.cloneNode(true),
container = document.createElement("div"),
container2 = document.createElement("div");
container = document.createElement("div");
container.appendChild(clone);
container2.innerHTML = container.innerHTML;
return container2.firstChild;
return jQuery.clean([container.innerHTML])[0];
} else
return this.cloneNode(true);
});