// Only these tags are recognised — anything else is treated as plain text (security allow-list) export const ALLOWED_TAGS = [ 'important', 'positive', 'negative', 'strong', 'strikethrough', 'paragraph', 'p', 'link', 'a', ] as const; export const TAG_ALIASES: Record = { p: 'paragraph', a: 'link' }; // Maximum recursive nesting before the parser emits tags as literal text (DoS protection) export const MAX_NESTING_DEPTH = 32; // Only these link targets are allowed — others are stripped to prevent iframe breakout export const ALLOWED_TARGETS = ['_blank', '_self']; // Only these protocols pass href validation — all others are blocked export const ALLOWED_PROTOCOLS = ['https:', 'mailto:'];