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

@@ -7,6 +7,9 @@ namespace App\Support\AcademyAnalytics;
final class AcademyAnalyticsContentType
{
public const HOME = 'academy_home';
public const PROMPT_LIBRARY = 'academy_prompt_library';
public const PROMPT_POPULAR = 'academy_prompt_popular';
public const PROMPT_PACK_LIBRARY = 'academy_prompt_pack_library';
public const PROMPT = 'academy_prompt';
public const LESSON = 'academy_lesson';
public const COURSE = 'academy_course';
@@ -22,6 +25,9 @@ final class AcademyAnalyticsContentType
{
return [
self::HOME,
self::PROMPT_LIBRARY,
self::PROMPT_POPULAR,
self::PROMPT_PACK_LIBRARY,
self::PROMPT,
self::LESSON,
self::COURSE,

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

View File

@@ -19,6 +19,11 @@ final class NewsCoverImage
'quality' => 76,
'suffix' => 'desktop',
],
'large' => [
'width' => 1280,
'quality' => 80,
'suffix' => 'large',
],
];
public static function isManagedPath(?string $path): bool