Skip to content

Fix CDATA decoding in XML text content - #369

Merged
MathNya merged 1 commit into
MathNya:masterfrom
developer0hye:fix/cdata-text-content
Sep 23, 2026
Merged

MathNya merged 1 commit into
MathNya:masterfrom
developer0hye:fix/cdata-text-content

Conversation

@developer0hye

Copy link
Copy Markdown
Contributor

Summary

Preserve CDATA content when reading XML text with Reader::read_text_into. The shared decoder now copies CDATA sections literally and unescapes only the surrounding text, preventing valid header/footer ampersands from panicking and avoiding literal CDATA delimiters in the parsed value.

Related: #368
Related: developer0hye/office2pdf#1709

Regression coverage

A synthetic workbook exercises both headers and footers through the public XLSX reader: ordinary entities, literal ampersands and tags, mixed text/CDATA, numeric references, adjacent/empty sections, and escaped text that resembles a CDATA delimiter. The test panics on unchanged master and passes with the patch.

Validation

  • cargo test --locked --test cdata_text: passed.
  • cargo test --locked: full suite passed, including documentation tests.
  • cargo clippy --locked -- -D warnings: passed.
  • Targeted nightly rustfmt and git diff --check: passed.
  • Read-only documentation freshness audit: PASS; no public API or usage change.

The local generated lockfile is retained for repeatability and not committed, following the repository's library policy. No dependencies or binary fixtures are added. This is an AI-assisted implementation.

Signed-off-by: Yonghye Kwon <developer.0hye@gmail.com>
@MathNya

MathNya commented Sep 23, 2026

Copy link
Copy Markdown
Owner

@developer0hye
Thank you for the PR.
Since there were no issues with the changes, I will merge them.

@MathNya
MathNya merged commit 4df775c into MathNya:master Sep 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants