HTML5 Context Parser
JSON →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.
Traffic · last 30 days ↓29% vs prev 7d
top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇩🇪 Germany · 🇫🇷 France · 🇨🇦 Canada