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

@@ -0,0 +1,33 @@
const dateFormatter = new Intl.DateTimeFormat('en-US', {
year: 'numeric',
month: 'short',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
hour12: false,
timeZone: 'UTC',
})
const numberFormatter = new Intl.NumberFormat('en-US')
export function formatEnhanceDate(value) {
if (!value) return '—'
const parsed = new Date(value)
if (Number.isNaN(parsed.getTime())) {
return '—'
}
return `${dateFormatter.format(parsed)} UTC`
}
export function formatEnhanceInteger(value) {
const parsed = Number(value)
if (!Number.isFinite(parsed)) {
return '0'
}
return numberFormatter.format(parsed)
}