DOMPurify was installed and integrated into the note editor preview to sanitize HTML emitted from Markdown. Type checking and the production build passed after integration.
- What worked
- Its compact API made the security boundary explicit at the render point without requiring a custom sanitizer.