1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-14 11:57:40 +00:00
community.general/changelogs
patchback[bot] 3bc92d03c4
[PR #12148/5004c9f7 backport][stable-13] xml: preserve DOCTYPE declaration when writing XML files (#12249)
xml: preserve DOCTYPE declaration when writing XML files (#12148)

* fix(xml): preserve DOCTYPE declaration when writing XML files

Pass `doctype=tree.docinfo.doctype` to all `ElementTree.write()` calls
so lxml does not silently drop the DOCTYPE on serialization. Also replace
`etree.tostring()` with BytesIO+write() in the diff and xmlstring paths
for consistency.

Fixes #2762



* test(xml): add integration test for DOCTYPE preservation



* feat(changelog): add fragment for xml DOCTYPE fix (#12148)



---------


(cherry picked from commit 5004c9f70f)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:33:15 +02:00
..
fragments [PR #12148/5004c9f7 backport][stable-13] xml: preserve DOCTYPE declaration when writing XML files (#12249) 2026-06-13 17:33:15 +02:00
.gitignore Add more default license and copyright notices (#5087) 2022-08-08 08:44:19 +02:00
changelog.yaml Release 13.0.1. 2026-05-25 21:19:41 +02:00
changelog.yaml.license Make reuse conformant (#5138) 2022-08-21 08:27:01 +02:00
config.yaml Normalize changelog configs. 2025-07-27 16:36:35 +02:00