From f0a680007f345a46bcd187b952a929c7068c1da8 Mon Sep 17 00:00:00 2001 From: Stanley <46876382+slateny@users.noreply.github.com> Date: Tue, 11 Oct 2022 02:27:49 -0700 Subject: gh-71616: Add note to warn against general translation of saxutils.escape() (#93450) * Add note to warn against general translation of saxutils.escape() * Use more direct wording --- Doc/library/xml.sax.utils.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/xml.sax.utils.rst b/Doc/library/xml.sax.utils.rst index e46fefd..ab4606b 100644 --- a/Doc/library/xml.sax.utils.rst +++ b/Doc/library/xml.sax.utils.rst @@ -25,6 +25,11 @@ or as base classes. replaced with its corresponding value. The characters ``'&'``, ``'<'`` and ``'>'`` are always escaped, even if *entities* is provided. + .. note:: + + This function should only be used to escape characters that + can't be used directly in XML. Do not use this function as a general + string translation function. .. function:: unescape(data, entities={}) -- cgit v0.12