1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-06-27 22:49:14 +00:00
community.general/tests
patchback[bot] b4e3d32e5a
[PR #12148/5004c9f7 backport][stable-12] xml: preserve DOCTYPE declaration when writing XML files (#12248)
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:13 +02:00
..
integration [PR #12148/5004c9f7 backport][stable-12] xml: preserve DOCTYPE declaration when writing XML files (#12248) 2026-06-13 17:33:13 +02:00
sanity [PR #12078/e6ca0df5 backport][stable-12] Fix typing (#12079) 2026-05-19 08:25:30 +02:00
unit [PR #12163/f9d4f0ad backport][stable-12] Fix incus Windows modules with ansible-core 2.21 (#12178) 2026-06-02 21:18:39 +02:00
utils [PR #12052/2f96093d backport][stable-12] CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12053) 2026-05-15 12:48:14 +02:00
.gitignore New module git config info (#7587) 2023-11-29 08:37:50 +01:00
config.yml
galaxy-importer.cfg Zuul third-party-check: disable ansible-doc part of galaxy-importer (#7907) 2024-01-27 15:28:10 +01:00