Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between e7ec906cd1120ae1543a8ce40abd1e33b79ec1dd and cb46b23. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughMermaid rendering now enables HTML labels by default. Rendered SVG uses a shared Mermaid-compatible DOMPurify configuration that preserves safe Priority: ➖ Normal 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the implementation and validation, but it omits most required template sections. It lacks the required ELI5, What Changed, Why, Visual Proof, Review, Agent skill upstream boundary, Notes, and Checklist sections. It also provides only “Related: Resolution Complete the repository template. Add the required section headings and content, use the required linked-issue format such as “Fixes
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d2449154-7a14-4d46-afb5-706caa5144a8
📥 Commits
Reviewing files that changed from the base of the PR and between 9ee3595 and ade522b573e99d1535f3f97638b5e3134037ec6c.
📒 Files selected for processing (10)
src/renderer/src/components/editor/MarkdownPreview.tsxsrc/renderer/src/components/editor/MermaidBlock.tsxsrc/renderer/src/components/editor/MermaidViewer.tsxsrc/renderer/src/components/editor/RichMarkdownCodeBlock.tsxsrc/renderer/src/components/editor/mermaid-config.test.tssrc/renderer/src/components/editor/mermaid-config.tssrc/renderer/src/components/editor/mermaid-sanitize.chromium.test.tssrc/renderer/src/components/editor/mermaid-sanitize.test.tssrc/renderer/src/components/editor/mermaid-sanitize.tssrc/renderer/src/components/sidebar/CommentMermaidBlock.tsx
ade522b to
d6b019f
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
d6b019f to
e7ec906
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Enable htmlLabels by default under securityLevel strict, and sanitize rendered SVG with Mermaid's own DOMPurify options (including HTML_INTEGRATION_POINTS.foreignobject) so formatting tags survive while scripts and javascript: URLs are still stripped. Adds happy-dom and Chromium regression coverage for the label/XSS contract (stablyai#12414). Co-authored-by: Cursor <[email protected]>
…ns in Chromium test
e7ec906 to
cb46b23
Compare
Keep explicit SVG, HTML, and MathML profiles so formatted and math labels render while filter primitives retain the previous restriction. Extend the adopted bbingz #12581 Chromium coverage for embedded documents, encoded handlers and URLs, namespace transitions, and browser reparsing.
Keep explicit SVG, HTML, and MathML profiles so formatted and math labels render while filter primitives retain the previous restriction. Extend the adopted bbingz #12581 Chromium coverage for embedded documents, encoded handlers and URLs, namespace transitions, and browser reparsing.
Summary
Preserve Mermaid HTML labels during Orca's final SVG cleanup. The sanitizer now retains
foreignObjectand its XHTML label contents using Mermaid's own DOMPurify integration-point options. HTML labels are enabled by default, and preview, editor and comment call sites no longer force them off. Mermaid's strict security mode remains enabled.This restores formatted labels such as bold text, italics and line breaks while the final cleanup still removes scripts, event-handler attributes and JavaScript URLs. Related: #12414.
Validation
At
e7ec906cd1120ae1543a8ce40abd1e33b79ec1dd:channel: 'chrome'in the two launch calls; the committed assertions were unchanged.--composite false), changed-file lint, formatting and diff whitespace checks passed. Independent Cursor review passed after inspecting the Chromium evidence.The default Chromium test launch still skips when its Playwright browser is unavailable. Happy-dom alone is not treated as the security verifier. Full repository tests, packaged builds and rendered checks of every Orca embedding surface were not run; the browser proof covers the actual rendering/sanitizer pipeline rather than a complete Electron session.
AI disclosure
Cursor ported and reviewed this change. Codex independently ran the existing assertions in Chrome, inspected a rendered proof and checked the source and validation results before updating the PR.