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/tests
Alexei Znamensky 5004c9f70f
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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 17:10:25 +02:00
..
integration xml: preserve DOCTYPE declaration when writing XML files (#12148) 2026-06-13 17:10:25 +02:00
sanity iptables_state: clean up code (#12093) 2026-05-25 14:58:55 +02:00
unit xenserver_guest_info: use fallback chain for VDI format detection (#12215) 2026-06-12 23:07:13 +12:00
utils CI: Replace Ubuntu 22.04 with 26.04 for ansible-core devel (#12052) 2026-05-15 10:08:58 +02:00
.gitignore New module git config info (#7587) 2023-11-29 08:37:50 +01:00
config.yml Add default license header to files which have no copyright or license header yet (#5074) 2022-08-05 14:03:38 +02:00
galaxy-importer.cfg Zuul third-party-check: disable ansible-doc part of galaxy-importer (#7907) 2024-01-27 15:28:10 +01:00