deprecate markupsafe exports
This commit is contained in:
parent
1ee22e1736
commit
9c02f07f9b
8 changed files with 41 additions and 20 deletions
|
|
@ -3,6 +3,7 @@ import logging
|
|||
import pytest
|
||||
import werkzeug.serving
|
||||
from jinja2 import TemplateNotFound
|
||||
from markupsafe import Markup
|
||||
|
||||
import flask
|
||||
|
||||
|
|
@ -73,7 +74,7 @@ def test_escaping(app, client):
|
|||
@app.route("/")
|
||||
def index():
|
||||
return flask.render_template(
|
||||
"escaping_template.html", text=text, html=flask.Markup(text)
|
||||
"escaping_template.html", text=text, html=Markup(text)
|
||||
)
|
||||
|
||||
lines = client.get("/").data.splitlines()
|
||||
|
|
@ -93,7 +94,7 @@ def test_no_escaping(app, client):
|
|||
@app.route("/")
|
||||
def index():
|
||||
return flask.render_template(
|
||||
"non_escaping_template.txt", text=text, html=flask.Markup(text)
|
||||
"non_escaping_template.txt", text=text, html=Markup(text)
|
||||
)
|
||||
|
||||
lines = client.get("/").data.splitlines()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue