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

Commit a8dedf7

Browse files
mgolNarretz
authored andcommitted
fix(jqLite): use XHTML-compliant HTML as input for jqLite
Fixes #6917 Closes #16518
1 parent b0815a7 commit a8dedf7

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
@@ -1369,7 +1369,7 @@ function convertTimezoneToLocal(date, timezone, reverse) {
13691369
*/
13701370
function startingTag(element) {
13711371
element = jqLite(element).clone().empty();
1372-
var elemHtml = jqLite('<div>').append(element).html();
1372+
var elemHtml = jqLite('<div></div>').append(element).html();
13731373
try {
13741374
return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
13751375
elemHtml.

src/ng/compile.js

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

0 commit comments

Comments
 (0)