Open BadIdeaException opened 1 year ago
It seems that parser.valid accepts even the most ludicrously malformed input strings as valid HTML:
parser.valid
const { valid } = require('node-html-parser'); var valid = require("node-html-parser").valid; valid('<p abc</p'); // false valid('<div<p abc</p></span>'); // false valid('<div><p abc</p></div>'); // true valid('<div<p abc</a></div>'); // true valid('@#><p'); // true valid('<<>'); // true
Also see here on RunKit
As far as I can see, none of the above should be true.
true
It seems that
parser.valid
accepts even the most ludicrously malformed input strings as valid HTML:Also see here on RunKit
As far as I can see, none of the above should be
true
.