From: Samuel Colvin Date: Tue, 9 May 2023 14:32:00 +0000 (+0100) Subject: 🐛 Fix `flask.escape` warning for internal tests (#9468) X-Git-Tag: 0.95.2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5100a98ccd42bf1201f6cde093222947facbc616;p=thirdparty%2Ffastapi%2Ffastapi.git 🐛 Fix `flask.escape` warning for internal tests (#9468) * fix flask.escape warning * 📝 Fix highlight in docs for WSGI --------- Co-authored-by: Sebastián Ramírez --- diff --git a/docs/en/docs/advanced/wsgi.md b/docs/en/docs/advanced/wsgi.md index df88659617..cfe3c78c11 100644 --- a/docs/en/docs/advanced/wsgi.md +++ b/docs/en/docs/advanced/wsgi.md @@ -12,7 +12,7 @@ Then wrap the WSGI (e.g. Flask) app with the middleware. And then mount that under a path. -```Python hl_lines="2-3 22" +```Python hl_lines="2-3 23" {!../../../docs_src/wsgi/tutorial001.py!} ``` diff --git a/docs_src/wsgi/tutorial001.py b/docs_src/wsgi/tutorial001.py index 500ecf883e..7f27a85a19 100644 --- a/docs_src/wsgi/tutorial001.py +++ b/docs_src/wsgi/tutorial001.py @@ -1,6 +1,7 @@ from fastapi import FastAPI from fastapi.middleware.wsgi import WSGIMiddleware -from flask import Flask, escape, request +from flask import Flask, request +from markupsafe import escape flask_app = Flask(__name__)