Skip to content

Commit 2f41b9c

Browse files
Merge pull request #191 from jeffreyzant/patch-1
Update froala-sanitize.js
2 parents 982ad22 + 3ff13c1 commit 2f41b9c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/froala-sanitize.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,12 @@
368368

369369
function parseEndTag(tag, tagName) {
370370
var pos = 0, i;
371-
tagName = tagName.toLowerCase();
371+
372+
// Find the closest opened tag of the same type
372373
if (tagName) {
373-
// Find the closest opened tag of the same type
374+
var needle = tagName.toLowerCase();
374375
for (pos = stack.length - 1; pos >= 0; pos--) {
375-
if (stack[pos] === tagName) {
376+
if (stack[pos] === needle) {
376377
break;
377378
}
378379
}
@@ -755,4 +756,4 @@
755756
}]);
756757

757758

758-
})(window, window.angular);
759+
})(window, window.angular);

0 commit comments

Comments
 (0)