From ae25688928e44a666fafcb5d9a12ba15bc47603c Mon Sep 17 00:00:00 2001 From: Jason Grey Date: Fri, 28 Aug 2026 00:44:36 -0500 Subject: [PATCH] docs(js): describe parser-backed extraction --- javascript/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/index.js b/javascript/index.js index 8e3b445..01bdcbe 100644 --- a/javascript/index.js +++ b/javascript/index.js @@ -284,10 +284,10 @@ function finalizeCanonicalParts(parts) { * 5. Decodes HTML entities. * 6. Applies the full text normalization pipeline (`normalizeText`). * - * This implementation is regex-based and is sufficient for signed content - * as typically produced by CMS platforms (blog posts, articles, news - * stories). For pathological or adversarial input, a real DOM parser - * should be used instead; the library API is compatible. + * The fragment is parsed with parse5, then walked as a DOM. A portable-profile + * validation pass rejects parser recovery and unsupported input before the + * parsed tree is traversed, so the same input produces the same result across + * bindings. * * @param {string} html - HTML fragment to canonicalize * @param {object} [options] - Options passed through to normalizeText