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
This commit is contained in:
Stanley 2022-10-11 02:27:49 -07:00 committed by GitHub
parent e0ae9ddffe
commit f0a680007f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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={})