Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a0c55af

Browse files
committed
fix(jqLite): use XHTML-compliant HTML as input for jqLite
Fixes #6917 Closes #16518
1 parent d1dd6a3 commit a0c55af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,7 @@ function convertTimezoneToLocal(date, timezone, reverse) {
13841384
*/
13851385
function startingTag(element) {
13861386
element = jqLite(element).clone().empty();
1387-
var elemHtml = jqLite('<div>').append(element).html();
1387+
var elemHtml = jqLite('<div></div>').append(element).html();
13881388
try {
13891389
return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
13901390
elemHtml.

src/ng/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
19451945
// for call to the link function.
19461946
// Note: This will already clone the nodes...
19471947
$linkNode = jqLite(
1948-
wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())
1948+
wrapTemplate(namespace, jqLite('<div></div>').append($compileNodes).html())
19491949
);
19501950
} else if (cloneConnectFn) {
19511951
// important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart

0 commit comments

Comments
 (0)