Merge pull request #4057 from rafaVls/unused-escape-import

Unused escape import
This commit is contained in:
David Lord 2021-05-14 13:54:21 -07:00 committed by GitHub
commit f64fff6476
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,7 +246,7 @@ of the argument like ``<converter:variable_name>``. ::
@app.route('/user/<username>')
def show_user_profile(username):
# show the user profile for that user
return f'User {username}'
return f'User {escape(username)}'
@app.route('/post/<int:post_id>')
def show_post(post_id):
@ -256,7 +256,7 @@ of the argument like ``<converter:variable_name>``. ::
@app.route('/path/<path:subpath>')
def show_subpath(subpath):
# show the subpath after /path/
return f'Subpath {subpath}'
return f'Subpath {escape(subpath)}'
Converter types: