summaryrefslogtreecommitdiff
path: root/docs/quick_tour/views
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-11-17 06:18:26 -0800
committerSteve Piercy <web@stevepiercy.com>2018-11-17 06:18:26 -0800
commit5ec822694f6d2e14513b3a3b03da2315ff996ce7 (patch)
treea583ae10ceba8918050958d11034b2a13838ac23 /docs/quick_tour/views
parent1662edc38e145fa820544fb3aad91ab86e3185da (diff)
downloadpyramid-5ec822694f6d2e14513b3a3b03da2315ff996ce7.tar.gz
pyramid-5ec822694f6d2e14513b3a3b03da2315ff996ce7.tar.bz2
pyramid-5ec822694f6d2e14513b3a3b03da2315ff996ce7.zip
Update Python source files in docs to use `from html import escape`, now that we ripped it out from `pyramid.compat`.
Diffstat (limited to 'docs/quick_tour/views')
-rw-r--r--docs/quick_tour/views/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/quick_tour/views/views.py b/docs/quick_tour/views/views.py
index 95a2b60ca..ffbe1d893 100644
--- a/docs/quick_tour/views/views.py
+++ b/docs/quick_tour/views/views.py
@@ -1,4 +1,4 @@
-from pyramid.compat import escape
+from html import escape
from pyramid.httpexceptions import HTTPFound
from pyramid.response import Response
@@ -16,7 +16,7 @@ def home_view(request):
def hello_view(request):
name = request.params.get('name', 'No Name')
body = '<p>Hi %s, this <a href="/goto">redirects</a></p>'
- # pyramid.compat.escape to prevent Cross-Site Scripting (XSS) [CWE 79]
+ # Python html.escape to prevent Cross-Site Scripting (XSS) [CWE 79]
return Response(body % escape(name))