Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function getHTMLTokens( html, logger = createLogger() ) {
try {
return new Tokenizer( new DecodeEntityParser() ).tokenize( html );
} catch ( e ) {
logger.warning( 'Malformed HTML detected: %s', html );
}
return null;
}
function getHTMLTokens( html ) {
try {
return new Tokenizer( new DecodeEntityParser() ).tokenize( html )
} catch ( e ) {
}
return null
}