
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Apply the HTML5 Tree Construction algorithm to a stream of html-tokenize tokens
Apply the HTML5 Tree Construction algorithm to a stream of html-tokenize
tokens
Simply pipe the output of html-tokenize
into an html-nest
stream.
var tokenize = require('html-tokenize');
var nest = require('html-nest');
htmlStream
.pipe(tokenize())
.pipe(nest())
..
The whatwg detailed specification of the Tree Construction algorithm can be found on https://html.spec.whatwg.org/multipage/syntax.html#tree-construction
The goal is to have something that works well with html-tokenize
and that matches as much as possible of the HTML5 Tree Construction algorithm, while keeping the benefits of streaming.
Currenly only a subset of the Tree Construction algorithm is implemented. The architecture of the code tries to follow the sections of the specification so it should hopefully be easy to add missing parts in a progressive fashion.
Feel free to send PRs, either for new tests or for implementation of missing parts.
There are some aspects of the Tree Construction algorithm to do not fit well with the streaming approach taken by html-tokenize
and html-nest
. We will try and express these limitations here:
html
element in the tree. The specification states that if several html
opening tags are found, their respective attributes should extend the attributes of the first html
element. It is currently not possible to do this in html-nest
since it would basically mean that we need to refrain from emitting any tokens before the whole document has been analyzed by html-nest
. We would loose all the benefits of streaming.FAQs
Apply the HTML5 Tree Construction algorithm to a stream of html-tokenize tokens
We found that html-nest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.