Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render
This commit is contained in:
@@ -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,
|
||||
|
||||
24
app/Support/ArtworkDescriptionContentValidator.php
Normal file
24
app/Support/ArtworkDescriptionContentValidator.php
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user