Encounters
﹤svg﹥ ⚬ˢᵛᵍ|encounter|ENC|20260905205800-00-•
Good context, and worth flagging: it looks like there’s now a Quartz 5 (the docs I found are dated June 2026), which postdates what I know well — so if you’re on that version, some specifics below may not translate perfectly. Worth a quick check of the changelog if v5 is what you’re running.
That aside, here’s the read on raw HTML in Quartz’s pipeline generally:
How it works under the hood: Quartz parses your markdown with
remark-parse, then converts to HTML withremark-rehype. That conversion step turns markdown into HTML, and then plugin-defined HTML-to-HTML transformations and content filtering happen afterward. Raw HTML embedded in markdown only survives that first conversion step ifallowDangerousHtmlis explicitly turned on — it defaults to false, and governs whether raw HTML in markdown is even kept in the tree at all. Stock Quartz configs generally do enable this (that’s why HTML embeds work for people at all), but it’s not universal.The thing to actually watch for: even with that flag on, a sanitize step can still strip things back out — the standard sanitizer follows a GitHub-style allowlist of what nodes and properties are permitted. A plain ` with `
` /``/`
` should be safe territory under most sanitizers since none of it is inherently dangerous (noonclick, nojavascript:URLs, no `/<image>aren’t on that list, it gets quietly dropped rather than erroring.Fastest way to just check, rather than reason about it: drop one test note with your snippet into the vault, run your normal Quartz build, and view-source the output
.htmlfile (or just open it and right-click → Inspect). If the<svg>is in the rendered DOM, you’re set — no config archaeology needed. If it’s missing, that’s your signal to go look atquartz.config.tsforrehype-sanitizeor a custom transformer in the plugin list.Good luck with the compile — let me know if it gets eaten and I can help figure out what stripped it.
Source: Claude Sonnet ○˒
Link to original