Files
genoffice/packages/docx-engine
945c370fb9 fix(docx): decode XML entities exactly once in parsed run text (#89)
fast-xml-parser already resolves the five named entities in text and
attribute values, so calling decodeEntities() on parser output decoded
them a second time: a document whose visible text literally contains
"&lt;" or "&amp;" turned into "<" / "&" at parse time, and editing the
paragraph then wrote the corrupted text back to word/document.xml.

Split out decodeNumericCharRefs() — numeric character references are
the only thing the parser leaves unresolved — and use it at the call
sites that read text or attributes off the parse tree. Call sites that
decode raw XML slices keep the full decode.

Fixes #88

Co-authored-by: codeAnqiang-ma <273298913+codeAnqiang-ma@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 15:55:35 +08:00
..
2026-08-02 19:52:16 +08:00
2026-08-10 23:17:11 +08:00
2026-08-02 19:52:16 +08:00
2026-08-02 19:52:16 +08:00