Zeige formatierte Texte überall als Klartext, wo kein HTML hingehört
Deploy Test / test (push) Successful in 4m27s
Deploy Test / deploy (push) Successful in 40s

Öffentliche Leser, Shop, Medienliste und Bibliothek lesen Kurzbeschreibung,
Beschreibung und Lernziel als Klartext; Mitgliederseiten zu Programm, Inhalt und
Artikel zeigen die formatierte Fassung. Der Editor trägt die deutsche Bezeichnung
des Felds als Namen für Hilfstechnik, der Tastaturfokus landet im Editor, und der
Abgleich merkt sich nur eine Prüfsumme. ADR-50 nennt Rückfall und Suche.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-24 00:01:53 +01:00
1 parent 9fbd933e1e
commit 99122ddfee
14 files changed
+85 -33

No files matched your search

@@ -8,6 +8,7 @@
use App\Domain\Catalog\ContentVersionStatus;
use App\Domain\Catalog\EditorialContentKind;
use App\Domain\Catalog\EditorialProfileReader;
use App\Domain\Catalog\FormattedText;
use App\Domain\Media\ThumbnailRef;
use Illuminate\Support\Collection;
@@ -166,7 +167,7 @@ public function entries(array $refs, bool $includeNonPublic): array
$entries[] = new CatalogEntry(
id: $composition->id,
title: $this->title($composition),
summary: filled($composition->summary) ? (string) $composition->summary : null,
summary: FormattedText::plain($composition->summary) ?: null,
kindLabel: (string) ($composition->editorialContentKind?->label ?? ''),
url: $public ? route('public.program', $composition) : null,
public: $public,
@@ -264,7 +265,7 @@ public function subject(mixed $id, bool $includeNonPublic): ?CardSubject
$kind = (string) ($composition->editorialContentKind?->label ?? ($program ? 'Programm' : 'Modul'));
$profile = app(EditorialProfileReader::class)->read($composition, 'kachel');
$summary = $profile->value('teaser') ?: $profile->value('summary');
$goal = filled($version?->learning_goal) ? trim((string) $version->learning_goal) : null;
$goal = FormattedText::plain($version?->learning_goal) ?: null;
// Zentrale Texte, aus denen die Redaktion den Kartentext wählen kann (Zielgruppe „Öffentliche Kachel“).
$texts = [
'teaser' => $profile->value('teaser'),
@@ -6,6 +6,7 @@
use App\Domain\Catalog\ContentElement;
use App\Domain\Catalog\ContentVersionStatus;
use App\Domain\Catalog\EditorialProfileReader;
use App\Domain\Catalog\FormattedText;
use App\Domain\Catalog\MaterialTag;
use App\Domain\Catalog\StructureNode;
use App\Domain\Media\ThumbnailRef;
@@ -175,7 +176,7 @@ public function subject(mixed $id, bool $includeNonPublic, array $draft = []): ?
$output = self::outputLabel((string) $shown->output_class);
$film = $shown->output_class === 'film';
$editorialKind = $element->editorialContentKind?->label;
$summary = filled($shown->summary) ? trim((string) $shown->summary) : null;
$summary = FormattedText::plain($shown->summary) ?: null;
$profile = app(EditorialProfileReader::class)->read($shown, 'bibliothek');
if (! array_key_exists('summary', $draft) && $profile->origin('summary') === 'variante') {
@@ -187,7 +188,8 @@ public function subject(mixed $id, bool $includeNonPublic, array $draft = []): ?
$texts = [];
foreach (['teaser', 'summary', 'description'] as $field) {
$own = filled($shown->getAttribute($field)) ? trim((string) $shown->getAttribute($field)) : null;
$own = filled($shown->getAttribute($field)) ? trim(in_array($field, FormattedText::FIELDS, true) ? FormattedText::plain((string) $shown->getAttribute($field)) : (string) $shown->getAttribute($field)) : null;
$own = $own === '' ? null : $own;
if (! array_key_exists($field, $draft) && $profile->origin($field) === 'variante') {
$own = $profile->value($field);