The replacement of angular.lowercase() with String toLowerCase() in froala-sanitize.js is causing errors. The example would be line 333 where the parseEndTag(); is called.
The parseEndTag() definition looks like this:
function parseEndTag(tag, tagName) {
var pos = 0, i;
tagName = tagName.toLowerCase();
if (tagName) {
// Find the closest opened tag of the same type
for (pos = stack.length - 1; pos >= 0; pos--) {
if (stack[pos] === tagName) {
break;
}
}
}
...
When the parseEndTag() on line 333 is called without any parameters, the tagName.toLowerCase(); call results in an error since the tagName is undefined.
On the other hand, the old definition tagName = angular.lowercase(tagName); didn't cause any errors if the tagName was undefined.
I haven't checked other places with the replacement so I am not sure that's the only place where it happens.
Got the same problem (Version 2.8.5). I just moved the tagName = tagName.toLowerCase(); expression inside the if statement. Hopefully a new release will solve this problem 👍
The replacement of
angular.lowercase()
with StringtoLowerCase()
in froala-sanitize.js is causing errors. The example would be line 333 where theparseEndTag();
is called.The parseEndTag() definition looks like this:
When the
parseEndTag()
on line 333 is called without any parameters, thetagName.toLowerCase();
call results in an error since thetagName
is undefined.On the other hand, the old definition
tagName = angular.lowercase(tagName);
didn't cause any errors if thetagName
was undefined.I haven't checked other places with the replacement so I am not sure that's the only place where it happens.