Files
genoffice/packages
ANIRUDDHA ADAKandAniruddha Adak cbcd289e49 fix(docx): handle numeric char refs, NBSP edges and empty self-closing runs in field patch (#359)
* fix(docx): handle numeric char refs, NBSP edges and empty self-closing runs in field patch

* fix(docx): correct NBSP test expectation for trimmed fieldDisplay

* fix(docx): guard char-ref codepoints and assert NBSP on patched XML only

- decodeXmlText leaves out-of-range (>0x10FFFF) and surrogate (0xD800-0xDFFF) refs untouched instead of throwing RangeError; regression test covers �, � and surrogates.

NBSP edge test now asserts patched XML only (xml:space preserve + NBSP in <w:t>), dropping the fieldDisplay round-trip which normalizes edge whitespace regardless of xml:space.

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-14 14:25:09 +08:00
..
2026-09-14 07:03:41 +08:00
2026-09-14 07:03:41 +08:00