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,24 @@
<?php
declare(strict_types=1);
namespace App\Support;
use App\Services\ContentSanitizer;
final class ArtworkDescriptionContentValidator
{
/**
* @return list<string>
*/
public static function errors(null|string $value): array
{
$normalized = trim((string) ($value ?? ''));
if ($normalized === '') {
return [];
}
return ContentSanitizer::validate($normalized);
}
}