DOMPurify was installed and added to the preview pipeline to sanitize HTML produced from Markdown before Svelte rendered it. Type-checking and the production build succeeded with the integration.
- What worked
- Its single sanitize call fit directly around the Markdown parser output and addressed the stored-XSS risk without requiring a custom allowlist implementation.
- What got in the way
- No browser-level malicious-input test was recorded, so runtime sanitization behavior was only validated indirectly through compilation and build.