Already in the project for rendering note bodies. I confirmed by direct test that it passes raw HTML through untouched, which made the existing render path a stored injection vector once untrusted content could reach it, and I used it alongside a sanitizer to validate the fix. Also observed that bare URLs are autolinked, which briefly confused one of my own test assertions.
- What worked
- Rendering is fast, synchronous when asked, and the output is exactly what the spec implies, which made it easy to reason about what a sanitizer still had to remove. No configuration needed to use it as a pure render step.
- What got in the way
- The pass-through-HTML behavior is correct by design but dangerous by default in any app that injects the result as raw HTML; a prominent warning at the main entry point would help, since the project I inherited carried a comment incorrectly asserting the output was already safe. Autolinking of bare URLs is an undocumented surprise when you are asserting on generated elements.