Skip to content

Commit

Permalink
fix(jqLite): use XHTML-compliant HTML as input for jqLite
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Mar 28, 2018
1 parent b0815a7 commit eefd120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit eefd120

Please sign in to comment.