Skip to content

Commit 2dd03a1

Browse files
fix(dashboard): escape author field in revision table
The author column in `dashboard revisions` output wasn't wrapped with `escapeMarkdownCell()`, so names/emails containing `|` would break the markdown table rendering.
1 parent 0a8d7d0 commit 2dd03a1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/commands/dashboard/revisions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ function formatRevisionsHuman(result: RevisionsResult): string {
7272
const rows: RevisionRow[] = result.revisions.map((r) => ({
7373
id: r.id,
7474
title: escapeMarkdownCell(r.title),
75-
author: r.createdBy?.name ?? r.createdBy?.email ?? r.createdBy?.id ?? "—",
75+
author: escapeMarkdownCell(
76+
r.createdBy?.name ?? r.createdBy?.email ?? r.createdBy?.id ?? "—"
77+
),
7678
created: `${escapeMarkdownCell(formatRelativeTime(r.dateCreated))}\n${colorTag("muted", r.dateCreated)}`,
7779
}));
7880

0 commit comments

Comments
 (0)