]> git.ipfire.org Git - thirdparty/tornado.git/commit
escape: Use the standard library where possible
authorBen Darnell <ben@bendarnell.com>
Wed, 23 Aug 2023 01:27:05 +0000 (21:27 -0400)
committerBen Darnell <ben@bendarnell.com>
Wed, 23 Aug 2023 01:27:05 +0000 (21:27 -0400)
commit129d11e071dfb1d6f7cf76b1a169b5ba842cc25c
tree6959c61f4ccbdc67a608f4ace7227ba17147d864
parentd33bd7d7de020dfebeb847311a49edb481991d76
escape: Use the standard library where possible

Many of these functions were necessary in Python 2, but are now
redundant. We can simply use the standard library in many cases.
The only major change is in xhtml_unescape, where we now reject
invalid character references such as surrogates and control characters.

Update docs throughout to be more specific about differences from the
standard library. Also be more complete about the ``plus`` option to
the url escaping functions.

Fixes #3186
tornado/escape.py
tornado/test/escape_test.py