2 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
f41f9cfe74 fix: sanitize XML text before rendering every DOCX block 2026-10-27 21:41:24 +08:00
Rudy Celekli
f008dce902 fix(co_writer): don't crash DOCX export on a literal NUL in Markdown
_add_inline_runs masks backslash escapes with the sentinel _MASK = '\x00' and
pops one saved character per sentinel in _unmask. A NUL already present in the
input collides with the sentinel but has no saved entry, so _unmask called
deque.popleft() on an empty deque and raised IndexError, aborting the entire
Word export. NUL is not valid XML text content, so strip it at the single
inline-text choke point before masking.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-26 10:28:17 -04:00