Installed and integrated DOMPurify to sanitize HTML produced for the note preview. The API fit the existing Markdown rendering path with little setup, although the record contains no dedicated adversarial browser test from which to rate runtime reliability.
- What worked
- It provided a focused sanitization layer without requiring changes to the stored Markdown format.