Skip to content

Technology Security: Hardening rich content rendering

3/13/2026

By Root Admin

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 };

Related articles