Skip to content

Fix unescaped font-family quotes in SVG output#35

Closed
smitbarmase wants to merge 1 commit into1jehuang:masterfrom
zed-industries:fix-font-family-xml-escaping
Closed

Fix unescaped font-family quotes in SVG output#35
smitbarmase wants to merge 1 commit into1jehuang:masterfrom
zed-industries:fix-font-family-xml-escaping

Conversation

@smitbarmase
Copy link

@smitbarmase smitbarmase commented Feb 11, 2026

Font families containing quotes (e.g. "Segoe UI") were interpolated directly into SVG font-family attributes without XML escaping, producing invalid XML. Handles it by adding escape_xml().

smitbarmase added a commit to zed-industries/zed that referenced this pull request Feb 13, 2026
Closes #10696

Adds support for rendering Mermaid diagrams in the markdown preview
using
[mermaid-rs-renderer](https://github.com/1jehuang/mermaid-rs-renderer)
(with [a
patch](1jehuang/mermaid-rs-renderer#35)).

- Renders mermaid diagrams on background task
- Shows the previously cached image while re-computing
- Supports a scale parameter i.e. default 100
- Falls back to raw mermaid source code when render fails

<img width="1512" height="897" alt="image"
src="https://github.com/user-attachments/assets/9157625d-bb62-402f-8a8b-517f28d43f95"
/>

Release Notes:

- Added mermaid diagram rendering support to the markdown preview panel.

---------

Co-authored-by: oscarvarto <contact@oscarvarto.mx>
Co-authored-by: oscarvarto <oscarvarto@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
@T00fy
Copy link

T00fy commented Feb 24, 2026

Was just about to add a PR to fix this and then noticed a fix was already raised lol

Please merge this in!! This error is trivial to recreate

@smitbarmase
Copy link
Author

Closing this in favor of #38, as it handles issue more correctly.

@smitbarmase smitbarmase closed this Mar 2, 2026
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