diff --git a/frontend/src/lib/document/DocumentDate.svelte b/frontend/src/lib/document/DocumentDate.svelte index 5b959881..8b06dbd4 100644 --- a/frontend/src/lib/document/DocumentDate.svelte +++ b/frontend/src/lib/document/DocumentDate.svelte @@ -1,30 +1,20 @@ @@ -61,10 +51,4 @@ const showRawLine = $derived( {:else} {label} {/if} - {#if showRawLine} - - {m.date_original_label()} {raw} - {/if} diff --git a/frontend/src/lib/document/DocumentDate.svelte.test.ts b/frontend/src/lib/document/DocumentDate.svelte.test.ts index fa842b7b..af0b8842 100644 --- a/frontend/src/lib/document/DocumentDate.svelte.test.ts +++ b/frontend/src/lib/document/DocumentDate.svelte.test.ts @@ -17,19 +17,4 @@ describe('DocumentDate', () => { render(DocumentDate, { props: { iso: '1916-06-01', precision: 'MONTH', raw: 'Juni 1916' } }); await expect.element(page.getByText('Juni 1916')).toBeInTheDocument(); }); - - it('shows the verbatim raw cell as a visible secondary line for UNKNOWN (not tooltip-only)', async () => { - render(DocumentDate, { props: { iso: null, precision: 'UNKNOWN', raw: 'Sommer?' } }); - // Real, visible text — not hidden behind a title attribute. - await expect.element(page.getByText('Datum unbekannt')).toBeInTheDocument(); - await expect.element(page.getByText(/Sommer\?/)).toBeVisible(); - }); - - it('renders a malicious raw value as inert escaped text (no element injected)', async () => { - const malicious = ''; - render(DocumentDate, { props: { iso: null, precision: 'UNKNOWN', raw: malicious } }); - // The payload appears as literal text, and no is created in the DOM. - await expect.element(page.getByText(/
-
@@ -194,7 +189,6 @@ function safeTagColor(color: string | null | undefined): string { iso={doc.documentDate} precision={doc.metaDatePrecision} end={doc.metaDateEnd} - showRaw={false} />