From 5ec822694f6d2e14513b3a3b03da2315ff996ce7 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 17 Nov 2018 06:18:26 -0800 Subject: Update Python source files in docs to use `from html import escape`, now that we ripped it out from `pyramid.compat`. --- docs/quick_tour/views/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/quick_tour/views') 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 = '

Hi %s, this redirects

' - # 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)) -- cgit v1.2.3