Zeige formatierte Texte überall als Klartext, wo kein HTML hingehört
Ö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:
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);
|
||||
|
||||
@@ -386,11 +386,18 @@ public function redaktionTitel(): string
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function richFelder(): array
|
||||
{
|
||||
return ['summary', 'description', 'learningGoal', 'materialNote', 'partBody', 'newTextBody'];
|
||||
return [
|
||||
'summary' => 'Kurzbeschreibung',
|
||||
'description' => 'Ausführliche Beschreibung',
|
||||
'learningGoal' => 'Lernziel',
|
||||
'materialNote' => $this->isExercise() ? 'Ausstattung' : 'Materialbedarf',
|
||||
'partBody' => 'Inhalt des Textes',
|
||||
'newTextBody' => 'Inhalt des neuen Textes',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -784,11 +784,11 @@ public function redaktionTitel(): string
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function richFelder(): array
|
||||
{
|
||||
return ['summary', 'descriptionText', 'bodyDraft'];
|
||||
return ['summary' => 'Kurzbeschreibung', 'descriptionText' => 'Ausführliche Beschreibung', 'bodyDraft' => 'Text der Fassung'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -202,11 +202,11 @@ public function redaktionTitel(): string
|
||||
}
|
||||
|
||||
/**
|
||||
* @return list<string>
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function richFelder(): array
|
||||
{
|
||||
return ['summary', 'descriptionText'];
|
||||
return ['summary' => 'Kurzbeschreibung', 'descriptionText' => 'Beschreibung'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,24 +28,30 @@ trait ManagesRichFields
|
||||
/** @var array<string, mixed> Zustand der Editoren (Dokumente) je Eigenschaft */
|
||||
public array $rich = [];
|
||||
|
||||
/** @var array<string, string> Zuletzt abgeglichener kanonischer Wert je Eigenschaft */
|
||||
/** @var array<string, string> Prüfsumme des zuletzt abgeglichenen kanonischen Werts je Eigenschaft */
|
||||
public array $richSeen = [];
|
||||
|
||||
/**
|
||||
* Eigenschaften dieser Seite, die mit dem Editor bearbeitet werden.
|
||||
* Eigenschaften dieser Seite, die mit dem Editor bearbeitet werden, mit ihrer Bezeichnung (Name für Hilfstechnik).
|
||||
*
|
||||
* @return list<string>
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function richFelder(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/** @return list<string> */
|
||||
protected function richNamen(): array
|
||||
{
|
||||
return array_keys($this->richFelder());
|
||||
}
|
||||
|
||||
public function richTextSchema(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->statePath('rich')
|
||||
->components(array_map(fn (string $name): RichEditor => RichField::make($name), $this->richFelder()));
|
||||
->components(array_map(fn (string $name, string $label): RichEditor => RichField::make($name, $label, hideLabel: true), $this->richNamen(), $this->richFelder()));
|
||||
}
|
||||
|
||||
public function richKomponente(string $name): ?Component
|
||||
@@ -58,7 +64,7 @@ public function updatedRich(mixed $value = null, ?string $key = null): void
|
||||
{
|
||||
$name = explode('.', (string) $key)[0];
|
||||
|
||||
if ($name !== '' && in_array($name, $this->richFelder(), true)) {
|
||||
if ($name !== '' && in_array($name, $this->richNamen(), true)) {
|
||||
$this->richPull($name);
|
||||
}
|
||||
}
|
||||
@@ -74,7 +80,7 @@ protected function richPull(string $name): void
|
||||
|
||||
$html = FormattedText::canonicalHtml((string) $component->getState());
|
||||
$this->{$name} = $html;
|
||||
$this->richSeen[$name] = $html;
|
||||
$this->richSeen[$name] = md5($html);
|
||||
}
|
||||
|
||||
/** Wert der Eigenschaft in den Editor schreiben. */
|
||||
@@ -88,16 +94,16 @@ protected function richPush(string $name): void
|
||||
|
||||
$canonical = FormattedText::canonical((string) $this->{$name});
|
||||
$component->state($canonical === '' ? null : $canonical);
|
||||
$this->richSeen[$name] = $canonical;
|
||||
$this->richSeen[$name] = md5($canonical);
|
||||
}
|
||||
|
||||
/** Vor dem Rendern: Eigenschaften, die der Server geändert hat, in den Editor übernehmen. */
|
||||
public function renderingManagesRichFields(): void
|
||||
{
|
||||
foreach ($this->richFelder() as $name) {
|
||||
foreach ($this->richNamen() as $name) {
|
||||
$canonical = FormattedText::canonical((string) $this->{$name});
|
||||
|
||||
if (! array_key_exists($name, $this->richSeen) || $this->richSeen[$name] !== $canonical) {
|
||||
if (! array_key_exists($name, $this->richSeen) || $this->richSeen[$name] !== md5($canonical)) {
|
||||
$this->richPush($name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
use App\Domain\Catalog\ContentElementVersion;
|
||||
use App\Domain\Catalog\ContentVersionStatus;
|
||||
use App\Domain\Catalog\EditorialVocabulary;
|
||||
use App\Domain\Catalog\FormattedText;
|
||||
use App\Domain\Catalog\IdentityDimensionValue;
|
||||
use App\Domain\Catalog\Pillar;
|
||||
use App\Domain\Catalog\PillarFilterCompat;
|
||||
@@ -488,8 +489,8 @@ private function haystack(ContentElement $element): string
|
||||
return mb_strtolower(implode("\n", array_filter([
|
||||
$element->working_title,
|
||||
$element->display_title,
|
||||
$element->description,
|
||||
$element->summary,
|
||||
FormattedText::plain($element->description),
|
||||
FormattedText::plain($element->summary),
|
||||
$element->teaser,
|
||||
$element->search_terms,
|
||||
$element->usage_note,
|
||||
@@ -504,7 +505,7 @@ private function haystack(ContentElement $element): string
|
||||
*/
|
||||
private function card(ContentElement $element, array $portrait, array $uses, array $codes, bool $canEdit): array
|
||||
{
|
||||
$description = trim((string) ($element->description ?: $element->summary ?: ''));
|
||||
$description = FormattedText::plain((string) ($element->description ?: $element->summary ?: ''));
|
||||
$usageNote = trim((string) $element->usage_note);
|
||||
$licenseNote = trim((string) $element->license_note);
|
||||
$typeKey = $this->typeKey((string) $element->output_class);
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
final class RichField
|
||||
{
|
||||
/**
|
||||
* @param ?string $label Mit Bezeichnung für Formulare und Dialoge; ohne bleibt sie dem Arbeitsplatz überlassen
|
||||
* @param ?string $label Bezeichnung des Felds; sie ist auch der Name für Hilfstechnik
|
||||
* @param bool $live Arbeitsplätze gleichen beim Verlassen des Felds ab ({@see ManagesRichFields}); Dialoge nicht
|
||||
* @param bool $hideLabel Die Bezeichnung zeigt der Arbeitsplatz selbst
|
||||
*/
|
||||
public static function make(string $name, ?string $label = null, bool $live = true): RichEditor
|
||||
public static function make(string $name, ?string $label = null, bool $live = true, bool $hideLabel = false): RichEditor
|
||||
{
|
||||
$field = RichEditor::make($name)->toolbarButtons(FormattedText::TOOLBAR);
|
||||
|
||||
@@ -23,6 +24,10 @@ public static function make(string $name, ?string $label = null, bool $live = tr
|
||||
$field->live(onBlur: true);
|
||||
}
|
||||
|
||||
return $label === null ? $field->hiddenLabel() : $field->label($label);
|
||||
if ($label !== null) {
|
||||
$field->label($label);
|
||||
}
|
||||
|
||||
return $label === null || $hideLabel ? $field->hiddenLabel() : $field;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Domain\Catalog\Bundle;
|
||||
use App\Domain\Catalog\Composition;
|
||||
use App\Domain\Catalog\FormattedText;
|
||||
use App\Domain\Cms\Catalog\PublicCatalogReader;
|
||||
use App\Domain\Commerce\Money;
|
||||
use App\Domain\Commerce\ProductOptions;
|
||||
@@ -30,7 +31,7 @@ public function index(Request $request, ProductOptions $products, PublicCatalogR
|
||||
}
|
||||
|
||||
$title = (string) ($composition->display_title ?: $composition->designation);
|
||||
$haystack = mb_strtolower($title.' '.$composition->teaser.' '.$composition->summary.' '.$composition->search_terms);
|
||||
$haystack = mb_strtolower($title.' '.$composition->teaser.' '.FormattedText::plain($composition->summary).' '.$composition->search_terms);
|
||||
|
||||
if ($term !== '' && ! str_contains($haystack, mb_strtolower($term))) {
|
||||
continue;
|
||||
@@ -40,7 +41,7 @@ public function index(Request $request, ProductOptions $products, PublicCatalogR
|
||||
$cards[] = [
|
||||
'url' => route('public.program', $composition),
|
||||
'title' => $title,
|
||||
'teaser' => (string) ($composition->teaser ?: $composition->summary),
|
||||
'teaser' => (string) ($composition->teaser ?: FormattedText::plain($composition->summary)),
|
||||
'from' => Money::format($summary['from_cents']),
|
||||
'count' => $summary['count'],
|
||||
];
|
||||
|
||||
@@ -724,6 +724,6 @@ ## ADR-50 – Formatierte Texte: bereinigtes HTML als einziges Format, ein Edito
|
||||
|
||||
**Alternativen.** Markdown als Speicherformat (verworfen, siehe oben); Dokument-JSON des Editors (verworfen: Quelle und CMS liefern HTML, Hashes und Vergleiche wären an die Editorversion gebunden); Formatspalte je Feld (verworfen: Migration ohne Gewinn, die Erkennung ist eindeutig, weil gespeichertes HTML kanonisch ist).
|
||||
|
||||
**Folgen.** Keine Migration. Nach einem Code-Rückfall zeigt der vorherige Stand HTML-Texte mit sichtbaren Tags; für Übungen spielt das keine Rolle, solange auf Prod keine Übung liegt. Die erste Übernahme mit HTML zählt für jeden Textabschnitt als Änderung der Quelle (die Formatierung kommt hinzu); wo ein Abschnitt lokal bearbeitet wurde, fragt die Vorschau nach. Das CMS nutzt weiter `RichText` (eigene Auswahl); die Umstellung auf denselben Baustein ist ein späterer Schritt.
|
||||
**Folgen.** Keine Migration. **Rückfall:** Sobald jemand mit diesem Stand einen Text in Modul, Programm, Übung, Medium oder Lizenzartikel speichert, liegt dort HTML. Setzt man danach nur den Code zurück, zeigt der vorherige Stand diese Texte mit sichtbaren Tags (Karten, Bibliothek, Shop, Mitgliederansicht); Daten gehen nicht verloren, denn die alten Felder speichern die Zeichenkette unverändert, und der neue Stand liest sie wieder richtig. Das gilt für den ganzen Katalog, nicht nur für Übungen; es gehört in die Zusammenfassung für den Merge `develop` → `main`. **Suche:** Datenbanksuchen mit `LIKE` über diese Spalten (Auswahl im Aufbau, Medienliste) treffen auch Bezeichnungen wie `strong` oder `li` und verfehlen Text mit `&`, weil er als `&` gespeichert ist. Die Suche in der Liste der Übungen und Module und im Shop vergleicht dagegen Klartext (`FormattedText::plain`). Die Datenbanksuchen bleiben eine bekannte Einschränkung. Die erste Übernahme mit HTML zählt für jeden Textabschnitt als Änderung der Quelle (die Formatierung kommt hinzu); wo ein Abschnitt lokal bearbeitet wurde, fragt die Vorschau nach. Das CMS nutzt weiter `RichText` (eigene Auswahl); die Umstellung auf denselben Baustein ist ein späterer Schritt.
|
||||
|
||||
**Quelle.** Anfragen von Lars vom 23.11.2026 (Formatierung der Übungstexte, Editoren für alle Textfelder); Shinkan-Commit „Deliver stored exercise HTML on the catalog API“.
|
||||
@@ -14,6 +14,8 @@ ## Was geprüft ist
|
||||
|
||||
Automatisch (Gate): Bereinigung und kanonische Form (`FormattedTextTest`), Anbindung des Editors an die Arbeitsplätze und Altbestand ohne Änderungsmarkierung (`FormatierteTexteEditorTest`), Mitgliederansicht und PDF mit fett und kursiv (`UebungAusgabeTest`), Übernahme aus Shinkan als HTML (`ShinkanUebernahmeTest`).
|
||||
|
||||
**Tastatur und Hilfstechnik (lokal):** „Bearbeiten“ per Enter setzt den Fokus in den Editor (`role=textbox`, Name = Bezeichnung des Felds, zum Beispiel „Ausführliche Beschreibung“). Escape schließt das Feld. Ein langer Text (80 Absätze, rund 37 KB) wird gespeichert, ohne die Grenze der Anfragegröße zu berühren.
|
||||
|
||||
## Gefundene und behobene Fehler
|
||||
|
||||
- Das Livewire-Limit für verschachtelte Pfade (10 Ebenen) lehnte Texte mit Aufzählung ab: `config/livewire.php` setzt 30. Der Test `test_a_list_and_a_nested_list_pass_the_payload_depth_guard` belegt es.
|
||||
@@ -22,7 +24,7 @@ ## Gefundene und behobene Fehler
|
||||
|
||||
## Offen
|
||||
|
||||
- Prüfung auf luf-test nach dem Deployment (breite und schmale Fenster, Tastatur im Editor).
|
||||
- Prüfung auf luf-test nach dem Deployment (breite **und schmale** Fenster, Tastatur im Editor). Schmale Fenster sind noch nirgends geprüft.
|
||||
- Echter Abruf aus Shinkan mit HTML, sobald die produktive Quelle `text_format: html` liefert (nicht geprüft).
|
||||
- Mitgliederansicht und PDF mit einem Testkonto auf luf-test (siehe `uebungen.md`).
|
||||
- Nicht umgestellt: CMS-Texte (eigene Auswahl `RichText`), Abweichungen je Zielgruppe, Variantenbeschreibung.
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="vw-kapsel is-geaendert">Geändert</span>
|
||||
@endif
|
||||
@if ($editable)
|
||||
<button type="button" class="vw-link vw-feld-aktion" x-on:click="offen = ! offen; if (offen) $nextTick(() => $refs.eingabe.focus())" x-bind:aria-expanded="offen" aria-controls="{{ $id }}">
|
||||
<button type="button" class="vw-link vw-feld-aktion" x-on:click="offen = ! offen; if (offen) $nextTick(() => ($refs.eingabe.matches('input, textarea') ? $refs.eingabe : $refs.eingabe.querySelector('[contenteditable=true]') ?? $refs.eingabe).focus())" x-bind:aria-expanded="offen" aria-controls="{{ $id }}">
|
||||
<span x-show="! offen">@include('filament.verwaltung.icon', ['name' => 'stift'])</span>
|
||||
<span x-text="offen ? 'Fertig' : '{{ $uebernommen || $wert === '' ? ($quelleTitel !== null ? 'Eigene Angabe' : 'Ergänzen') : 'Bearbeiten' }}'">Bearbeiten</span>
|
||||
</button>
|
||||
@@ -49,9 +49,11 @@
|
||||
|
||||
@if ($editable)
|
||||
<div class="vw-feld-edit" id="{{ $id }}" x-show="offen" x-cloak>
|
||||
<label class="vw-sr" for="{{ $id }}-eingabe">{{ $feld['label'] }}</label>
|
||||
@unless ($rich)
|
||||
<label class="vw-sr" for="{{ $id }}-eingabe">{{ $feld['label'] }}</label>
|
||||
@endunless
|
||||
@if ($rich)
|
||||
<div id="{{ $id }}-eingabe" x-ref="eingabe" class="vw-rich-eingabe" x-on:keydown.escape.stop="offen = false">{{ $this->richKomponente($model) }}</div>
|
||||
<div id="{{ $id }}-eingabe" x-ref="eingabe" class="vw-rich-eingabe" role="group" aria-labelledby="{{ $id }}-titel" x-on:keydown.escape.stop="offen = false">{{ $this->richKomponente($model) }}</div>
|
||||
@elseif ($kind === 'textarea')
|
||||
<textarea id="{{ $id }}-eingabe" x-ref="eingabe" rows="{{ $feld['rows'] ?? 4 }}" wire:model.live.blur="{{ $model }}" placeholder="{{ $uebernommen || $wert === '' ? ($quelleWert !== '' ? $quelleWert : ($feld['placeholder'] ?? '')) : ($feld['placeholder'] ?? '') }}" @if ($fehler) aria-invalid="true" aria-describedby="{{ $id }}-fehler" @endif x-on:keydown.escape.stop="offen = false"></textarea>
|
||||
@else
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<div class="mb-outline-main">
|
||||
<h2 class="mb-outline-title">{{ $entry['title'] === $entry['role'] ? $entry['title'] : $entry['role'].': '.$entry['title'] }}</h2>
|
||||
@if (filled($entry['version']->element->description))
|
||||
<p class="mb-outline-text">{{ $entry['version']->element->description }}</p>
|
||||
<div class="mb-outline-text mb-prose">{!! \App\Domain\Catalog\FormattedText::display($entry['version']->element->description) !!}</div>
|
||||
@endif
|
||||
</div>
|
||||
@if ($entry['playable'])
|
||||
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
use App\Domain\Catalog\CompositionKind;
|
||||
use App\Domain\Catalog\ContentService;
|
||||
use App\Domain\Catalog\EditorialProfileReader;
|
||||
use App\Domain\Catalog\FormattedText;
|
||||
use App\Domain\Catalog\IdentityChange;
|
||||
use App\Filament\Resources\ContentElements\Pages\ViewContentElement;
|
||||
use App\Filament\Resources\Practices\Pages\EditPractice;
|
||||
use App\Filament\Support\EditorialCatalog;
|
||||
use App\Http\LibraryCatalog;
|
||||
use App\Models\User;
|
||||
use Filament\Facades\Filament;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
@@ -99,6 +101,29 @@ public function test_a_list_and_a_nested_list_pass_the_payload_depth_guard(): vo
|
||||
$this->assertStringContainsString('Geändert', $component->get('summary'));
|
||||
}
|
||||
|
||||
public function test_a_formatted_summary_reads_as_plain_text_wherever_a_card_or_list_uses_it(): void
|
||||
{
|
||||
$practice = app(EditorialCatalog::class)->create('Stopp sagen', CompositionKind::Exercise);
|
||||
$practice->forceFill([
|
||||
'summary' => '<p>Kurz <strong>fett</strong> & klar</p><ul><li><p>Eins</p></li><li><p>Zwei</p></li></ul>',
|
||||
'description' => '<p>Lang <em>erklärt</em></p>',
|
||||
])->save();
|
||||
|
||||
$text = app(LibraryCatalog::class)->text($practice->fresh());
|
||||
|
||||
$this->assertSame('Kurz fett & klar
|
||||
|
||||
- Eins
|
||||
- Zwei', $text['summary']);
|
||||
$this->assertSame('Lang erklärt', $text['description']);
|
||||
$this->assertStringContainsString('<strong>fett</strong>', $text['summary_html']);
|
||||
$this->assertStringContainsString('<em>erklärt</em>', $text['description_html']);
|
||||
|
||||
$profile = app(EditorialProfileReader::class)->read($practice->fresh(), 'bibliothek');
|
||||
$this->assertStringNotContainsString('<', (string) $profile->value('summary'));
|
||||
$this->assertStringContainsString('<ul>', $profile->html('summary'));
|
||||
}
|
||||
|
||||
public function test_opening_a_legacy_exercise_reports_no_unsaved_changes(): void
|
||||
{
|
||||
$exercise = $this->exercise('Altbestand');
|
||||
|
||||
Reference in new issue
Block a user