fix: malformed numeric entities no longer crash entity decoding

↗ view on GitHub · Eli Ziff · 2026-07-27 · c8873be6

String.fromCodePoint throws on code points above 0x10FFFF, so provider
markup carrying garbage like � crashed structure parsing and
XML text decoding. Guard both sites the way legalSourcePresentation
already does: out-of-range entities pass through as raw text. Verified
live: 'a � b � c é d' now decodes with the
garbage intact and the valid entity converted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUsMXzBsEJ27DjJVPSfW5o
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents 8d58d873
Stats 2 files changed , +18 , -10
Part of SourceDoc / DOCX engine: redlines, tracked changes, editing benchmark

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-c8873be6.md from inside the repo you want the change in.

⬇ Download capture-commit-c8873be6.md