Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render

This commit is contained in:
2026-06-04 07:52:57 +02:00
parent 0b33a1b074
commit 15870ddb1f
191 changed files with 15453 additions and 1786 deletions

View File

@@ -32,9 +32,11 @@ class ContentSanitizer
public const EMOJI_DENSITY_MAX = 0.40;
// HTML tags we allow in the final rendered output
// Include heading tags so editor-produced headings (h1-h6) are preserved.
private const ALLOWED_TAGS = [
'p', 'br', 'strong', 'em', 'code', 'pre',
'a', 'ul', 'ol', 'li', 'blockquote', 'del',
'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
];
// Allowed attributes per tag