diff options
| author | westurner <wes.turner@gmail.com> | 2014-04-15 10:27:38 -0500 |
|---|---|---|
| committer | westurner <wes.turner@gmail.com> | 2014-04-15 10:27:38 -0500 |
| commit | f1f35b771cb361a0e6e47a271292d48bf21c3cdd (patch) | |
| tree | e20fc7b7f9169936d586d9ee8f9a405cfe5a9406 /docs | |
| parent | 133e75fe04e587a6d11e3a501b5e34793ef440bc (diff) | |
| download | pyramid-f1f35b771cb361a0e6e47a271292d48bf21c3cdd.tar.gz pyramid-f1f35b771cb361a0e6e47a271292d48bf21c3cdd.tar.bz2 pyramid-f1f35b771cb361a0e6e47a271292d48bf21c3cdd.zip | |
DOC: Add cgi.escape to quick_tour/views/views.py (Fixes #1294)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/quick_tour/views/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/quick_tour/views/views.py b/docs/quick_tour/views/views.py index 9dc795f14..0ca1347f2 100644 --- a/docs/quick_tour/views/views.py +++ b/docs/quick_tour/views/views.py @@ -2,6 +2,7 @@ from pyramid.httpexceptions import HTTPFound from pyramid.response import Response from pyramid.view import view_config +import cgi # First view, available at http://localhost:6543/ @view_config(route_name='home') @@ -14,7 +15,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>' - return Response(body % name) + return Response(body % cgi.escape(name)) # /goto which issues HTTP redirect to the last view |
