node-html-parser
node-html-parser copied to clipboard
A very fast HTML parser, generating a simplified DOM, with basic element query support.
I'm encountering an issue while parsing SVG files using node-html-parser. Specifically, when manipulating SVG elements that have a design-color attribute defined, I use node.setAttribute('fill', color); to dynamically set their fill...
How to reproduce the issue: ```ts import { parse } from "node-html-parser"; console.log( parse( ` bash export AWS_SECRET_ACCESS_KEY= ]]> ` ).toString() ); ``` Output of such program is: ``` bash...
# Description Given the input ``` Update login with credentials do something systemctl stop service systemctl start service ``` when i call ``` const content = parse(inputGivenAbove) const codeElements =...
I spent hours reviewing my code, when I discovered that the error was in your package, here is the code that fails: strHtml: [https://drive.google.com/file/d/1DkO-PzbkTcmTlDgUrYxXsBMNYwxtNUUB/view?usp=sharing](url) when I do: ``` JavaScript let...
It seems that `parser.valid` accepts even the most ludicrously malformed input strings as valid HTML: ``` const { valid } = require('node-html-parser'); var valid = require("node-html-parser").valid; valid('
Hello, @taoqf! `parseNoneClosedTags` property doesn't work properly. Wrong html fragment: ```html 1 (1) 2(1) 3(1) 4(1) 5(1) 6(1) 7(1) 8(1) ``` Browser fixed output (from devtools): ```html ... 1 (1)...
Example: ```javascript var doc = nodeParse(' link // error close tag ') var anchor = doc.querySelector('.anchor') console.log(anchor.parentNode.parentNode.parentNode) //Returns
`Launch demo modal` **v-b-modal.modal-1** is a vuejs directive. Per vuejs documentation, all vuejs code is valid html...not sure it is true. The dot is apparently a valid character for an...
I notice that HTMLElement.text returns text content of script and style tags too. Expected behavior of it is to not include those, as `innerText` should return only human readable content....