git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #2184 by using the jQuery.clean() function instead of a direct innerHTML assignme...
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
b90427b
..
4cb0a22
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-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),
// 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);
container.appendChild(clone);
- container2.innerHTML = container.innerHTML;
- return container2.firstChild;
+ return jQuery.clean([container.innerHTML])[0];
} else
return this.cloneNode(true);
});
} else
return this.cloneNode(true);
});