submissions(#23): format submission bodies (safe markdown-lite)

Submission cards showed the raw form markdown ("### Bug Report", "- npub: …").
Added a tiny, SAFE renderer: `#…###` headings → bold lines, leading `- `/`* `
bullet markers stripped, `**bold**` honored inline — built entirely with
textContent/createTextNode + <strong>, so no HTML is ever parsed from the
content (submissions are untrusted public events; rendering raw markdown/HTML
would be an XSS hole). Lint (innerHTML check) + build clean; tests 26/26.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-07-07 09:21:26 -04:00
1 parent ba287a62be
commit 36cb71b676
2 files changed
+56 -3

No files matched your search

+13 -1
View File
@@ -3210,10 +3210,22 @@
}
.submission-card__body {
display: flex;
flex-direction: column;
gap: var(--space-3xs);
}
.submission-card__heading {
margin: 0;
font-size: var(--font-size-sm);
font-weight: 600;
color: var(--color-text-strong);
}
.submission-card__line {
margin: 0;
font-size: var(--font-size-sm);
color: var(--color-text);
white-space: pre-wrap;
word-break: break-word;
}