html5parser icon indicating copy to clipboard operation
html5parser copied to clipboard

A super tiny and fast html5 AST parser.

Results 19 html5parser issues
Sort by recently updated
recently updated
newest added

The `noNestedTags` seems to be used for tree-construction but also subsets the list of tags changing the context of the parser to either [RCData or RAWText](https://html.spec.whatwg.org/#parsing-html-fragments), both of which seem...

CSS can be harmful and must be sanitized w/ e.g. [cssfilter](https://github.com/leizongmin/js-css-filter). It is not a safe default setting to allow the `style` attribute. https://github.com/acrazing/html5parser/blob/cc95ffc4b50d99e64a477eb34934113f2d0ca3c4/src/safeHtml.ts#L95

Can you consider adding a [stringify] method? ast==>html string Thanks.

The list of self-closing tags is incomplete. I'd suggest to use https://github.com/wooorm/html-void-elements as a basis and extend it w/ the special tag-names for comments and doctypes. https://github.com/acrazing/html5parser/blob/cc95ffc4b50d99e64a477eb34934113f2d0ca3c4/src/config.ts#L19

Hey! I wonder how can I use this library to get the innerText of my HTML string and also preserve the new lines? ``` const htmlstring = `helloworld` const result...

Bumps [terser](https://github.com/terser/terser) from 5.7.0 to 5.14.2. Changelog Sourced from terser's changelog. v5.14.2 Security fix for RegExps that should not be evaluated (regexp DDOS) Source maps improvements (#1211) Performance improvements in...

dependencies

Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7. Release notes Sourced from node-fetch's releases. v2.6.7 Security patch release Recommended to upgrade, to not leak sensitive cookie and authentication header information to 3th...

dependencies

Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.7.2 to 1.7.3. Changelog Sourced from shell-quote's changelog. 1.7.3 Fix a security issue where the regex for windows drive letters allowed some shell meta-characters to escape the...

dependencies

Bumps [semver-regex](https://github.com/sindresorhus/semver-regex) from 3.1.2 to 3.1.4. Release notes Sourced from semver-regex's releases. v3.1.4 Backport of ReDoS fix https://github.com/sindresorhus/semver-regex/commit/7712ba564d40da101cf2b2b33e6a910d9f2f57f4 Commits 906cf40 3.1.4 7712ba5 Fix ReDoS vulnerability backport a0203db Fix ReDoS vulnerability...

dependencies

Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. Commits 7efb22a 1.2.6 ef88b93 security notice for additional prototype pollution issue c2b9819 isConstructorOrProto adapted from PR bc8ecee test from prototype pollution PR See full...

dependencies