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

fix(jqLite): use XHTML-compliant HTML as input for jqLite #16518

Merged
merged 1 commit into from
Apr 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ function convertTimezoneToLocal(date, timezone, reverse) {
*/
function startingTag(element) {
element = jqLite(element).clone().empty();
var elemHtml = jqLite('<div>').append(element).html();
var elemHtml = jqLite('<div></div>').append(element).html();
try {
return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
elemHtml.
Expand Down
2 changes: 1 addition & 1 deletion src/ng/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
// for call to the link function.
// Note: This will already clone the nodes...
$linkNode = jqLite(
wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())
wrapTemplate(namespace, jqLite('<div></div>').append($compileNodes).html())
);
} else if (cloneConnectFn) {
// important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
Expand Down