JS: Tolerate Angular-specific HTML attribute names

This commit is contained in:
Asger Feldthaus
2020-12-07 13:02:53 +00:00
parent f33630aab6
commit 5fa3b17956

View File

@@ -144,6 +144,9 @@ public class HTMLExtractor implements IExtractor {
@Override
public LoCInfo extract(TextualExtractor textualExtractor) {
// Angular templates contain attribute names that are not valid HTML/XML, such as [foo], (foo), [(foo)], and *foo.
// Allow a large number of errors in attribute names, so the Jericho parser does not give up.
Attributes.setDefaultMaxErrorCount(100);
JavaScriptHTMLElementHandler eltHandler = new JavaScriptHTMLElementHandler(textualExtractor);
HtmlPopulator extractor =