mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
* fix: Encode code & math fences in table cells with <br> to avoid breaking rows Code and LaTeX fences inside table cells emitted literal newlines during Markdown serialization, breaking the single-line table-row structure and corrupting the whole table. Serialize them on a single line using <br> for line breaks (and escaped pipes) when inside a table, matching the existing handling for lists and hard breaks. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix: Escape backslashes in table-cell code & math fences CodeQL flagged incomplete string escaping: escaping pipes as \| without escaping pre-existing backslashes leaves the encoding ambiguous. Escape the backslash (the escape character) and pipe together in a single pass so cell content cannot break out of the column. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test: Cover math block table-cell serialization Add a test mirroring the code fence case to guard the MathBlock half of the table-cell <br> encoding and pipe/backslash escaping. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>