Repository navigation
fix: decode XML references in DOCX artifacts - #7088
MrCapricornLiu wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hi @MrCapricornLiu, Thank you for contributing this fix! The How to resolve:
After pushing, you can click the "Details" link on the Thank you for your help! |
Signed-off-by: Chenghao Liu <chliu@stu.pku.edu.cn>
499a481 to
f5a46ae
Compare
|
Rebased onto current Local verification with the repo's unit tests: Thanks for the clear instructions in your previous comment. Could a reviewer take a look now? |
Loading a DOCX containing
Research & Developmentcurrently sendsResearch & Developmentto the model. Decode XML predefined entities and decimal/hex character references once after extracting text, preserving the bounded ZIP reader and leaving unknown or invalid references unchanged.Reproduction and expected behavior
On ADK 2.8.0 / main (
2284c581), Linux, Python 3.12.13, run the added regression cases in:The added cases fail on the original implementation and pass with this change. No LiteLLM or live model endpoint is required; Runner verification uses a scripted
BaseLlmresponse.Testing Plan
Type checking matches the unmodified upstream baseline (831 existing errors; no new errors).
da10185e): 52 passed.2284c581was also verified in a clean environment.2284c581, Python 3.10–3.14: tests passed with the two GC-introspection cases run in separate processes (14,251 passing cases on Python 3.12). One unrelated MCP stdio teardown case was deselected after it also failed to finish on the unmodified base. The default uninterruptedtoxrun did not complete.Runner setup and reproduction output
Save the following as
repro.py, then runpython repro.pyafter installing the locally built wheel.