HTML5 Context Parser

JSON →
library 2.0.1 ·javascript
verified May 27, 2026

context-parser is a robust and compact HTML5 context parser library designed to analyze web pages and report the execution context of each character, primarily for security purposes like preventing Cross-Site Scripting (XSS). The current stable version is 2.0.1. It differentiates itself by adhering strictly to the HTML5 WHATWG specification for accurate context determination, offering two distinct parser classes: `FastParser` for performance-critical scenarios and `Parser` for feature-rich analysis. The library is event-driven and focuses on the tokenization process to provide precise context reporting without unnecessary overhead, making it suitable for server-side HTML analysis. Its design emphasizes security, simplicity, and straightforward code for easier review and smaller footprint.

total hits 26
actors 8 distinct systems
last hit 20h ago human
ByteDance
9
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
1

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇩🇪 Germany · 🇫🇷 France · 🇨🇦 Canada