Skip to content

Check diagram label escaping by rendered safety - #2399

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-38133035955-diagram-escaping
Oct 11, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-38133035955-diagram-escaping

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The diagram label injection check now verifies the rendered safety contract: the suspicious label appears as SVG text, no image or script element is inserted, and the event handler never runs. In main run 38133035955, the exact-text assertion failed because the Mermaid renderer rebuilt in #2259 sanitized the label from <img src=x onerror=...> to <img src="x"> before Leaf inserted its SVG.

The original test failed on main and passed with this change. This keeps the security check while allowing the renderer to remove dangerous attributes and change its textual serialization.

@max-sixty
max-sixty merged commit a70711b into main Oct 11, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/ci-38133035955-diagram-escaping branch October 11, 2026 15:14
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