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/plugins
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
..
action iptables_state: clean up code (#12093) 2026-05-25 14:58:55 +02:00
become pfexec become plugin: fix broken defaults for illumos/SmartOS (#11623) 2026-04-25 21:12:36 +02:00
cache Sort imports with ruff check --fix (#11400) 2026-01-09 07:40:58 +01:00
callback counter_enabled callback: display output for looped tasks (#12067) 2026-06-13 17:01:50 +02:00
connection Fix incus Windows modules with ansible-core 2.21 (#12163) 2026-06-02 21:04:02 +02:00
doc_fragments kopia: Add kopia_repository module (#11752) 2026-05-30 13:38:30 +02:00
filter version_sort filter: fix example's description (#12167) 2026-06-02 18:22:05 +02:00
inventory multiple: replace namedtuple with dataclass (#12094) 2026-05-25 15:50:34 +02:00
lookup filetree lookup: handle invalid exclude regex with AnsibleError (#12140) 2026-06-04 06:19:10 +02:00
module_utils xenserver_guest_info: use fallback chain for VDI format detection (#12215) 2026-06-12 23:07:13 +12:00
modules xml: preserve DOCTYPE declaration when writing XML files (#12148) 2026-06-13 17:10:25 +02:00
plugin_utils Lookup plugins: prevent using _terms for positional arguments, and reject positional arguments completely for lookups that don't use them (#12060) 2026-05-17 09:43:21 +02:00
test Make all doc fragments, module utils, and plugin utils private (#11896) 2026-04-20 20:16:26 +02:00