summaryrefslogtreecommitdiff
path: root/docs/quick_tour/views
diff options
context:
space:
mode:
authorMichael Merickel <github@m.merickel.org>2018-11-18 12:56:45 -0600
committerGitHub <noreply@github.com>2018-11-18 12:56:45 -0600
commit880fcbdf366e231a746dc3ab694b1b88771d23c2 (patch)
treeb0349a9bfb006c26d454b96aaf7114f1714ba776 /docs/quick_tour/views
parentd4ce9d3f915b18425b4ce5224a51a89342270371 (diff)
parent847d1835a5b76da4925ee3248e69148cc4235df9 (diff)
downloadpyramid-880fcbdf366e231a746dc3ab694b1b88771d23c2.tar.gz
pyramid-880fcbdf366e231a746dc3ab694b1b88771d23c2.tar.bz2
pyramid-880fcbdf366e231a746dc3ab694b1b88771d23c2.zip
Merge pull request #5 from stevepiercy/drop-py2
Drop py2
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))