From 153cd7f448b68e5850c62ceac47dce57980b34e4 Mon Sep 17 00:00:00 2001 From: Ian Winsemius Date: Tue, 19 May 2026 16:51:14 -0700 Subject: [PATCH 1/2] DataTable: add Table.CopyAsMarkdownButton with hardened markdown serializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an opt-in slot button for copying the visible rows to the clipboard as a GitHub-flavoured Markdown table. Security model (audit hand-off): - Cell values are projected via `Column.getExportValue` (preferred) or the field value via dotted-path traversal. `renderCell` is explicitly NEVER called — React/JSX output cannot reach the clipboard. - Escaping rules: `\` → `\\`, `|` → `\|`, CR/LF → single space, ASCII / Unicode control characters (including TAB and DEL) stripped. Backticks, brackets, asterisks intentionally not escaped — they cannot break the table cell layout, and downstream Markdown renderers may legitimately style them. - Output is always `text/plain`. No HTML, no inline-HTML escape hatches. - Clipboard write prefers the async Clipboard API, falls back to `document.execCommand('copy')` via a hidden `