Technology Security: Hardening rich content rendering
4/17/2026
By Unknown
Hardening Rich Content
We sanitize stored HTML while preserving code blocks for readability.
What we allow
- Headings (H1-H3)
- Images with lazy loading
- Preformatted code snippets
TypeScript example
type Sanitized = { html: string };