Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Doc/library/xml.sax.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ or as base classes.
content: if ``False`` (the default) they are emitted as a pair of start/end
tags, if set to ``True`` they are emitted as a single self-closed tag.

.. warning::
:class:`!XMLGenerator` does not validate element or
attribute names. Callers must ensure that names passed to APIs conform
to `XML name rules <https://www.w3.org/TR/xml/#NT-Name>`__ if passing
untrusted input. Character data and attribute values are escaped,
but not validated.

.. versionchanged:: 3.2
Added the *short_empty_elements* parameter.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:mod:`xml.sax.saxutils`: Add warning about lack of
validation for :class:`~xml.sax.saxutils.XMLGenerator`.
Loading