Skip to content

Upgrade dompurify and js-yaml - #217

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Oct 23, 2026
Merged

cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are narrowly scoped, dependency updates are consistent, and focused regression coverage accompanies the sanitizer isolation with no blocking issues identified.

No open issues 🎉

What changed in this PR

Upgrades DOMPurify and js-yaml while preserving preview rendering and front-matter behavior.

Changes:

  • Updates dependency versions and lockfile resolutions.
  • Isolates HTML and table widget sanitizers from Mermaid’s shared-instance hooks.
  • Adds regression coverage for sanitization, math rendering, and YAML parsing.
File Description
yarn.lock Updates and consolidates dependency resolutions.
tests/​mermaid.integration.test.ts Checks widget sanitization remains unchanged after rendering Mermaid.
tests/​hiddenSyntax/​table.test.ts Covers math markup preservation and safe table attributes.
tests/​hiddenSyntax/​html.test.ts Covers safe attributes and HTML-only sanitization.
tests/​frontMatter.test.ts Checks quoted values and body preservation after invalid metadata.
tests/​frontMatter.parse.test.ts Extends YAML validation, tag, and alias coverage.
src/​hiddenSyntax/​components/​table.ts Creates an independent table sanitizer instance.
src/​hiddenSyntax/​components/​html.ts Creates an independent HTML sanitizer instance.
package.json Bumps DOMPurify and js-yaml versions.

Review effort: Balanced

@cyanzhong
cyanzhong merged commit 4e5d2a3 into main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants