Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape: Use the standard library where possible #3317

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

bdarnell
Copy link
Member

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

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 tornadoweb#3186
Newer versions of pyflakes no longer require this.
@bdarnell bdarnell merged commit 95821a1 into tornadoweb:master Aug 23, 2023
11 checks passed
@bdarnell bdarnell deleted the escape-updates branch August 23, 2023 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plus option to url_escape changes more than encoding of spaces
1 participant