summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/src/authentication
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2017-04-30 02:02:26 -0500
committerMichael Merickel <michael@merickel.org>2017-04-30 02:02:26 -0500
commit9c15a8eac2848cc7a81f174ecf7a6c63be323f51 (patch)
treeabf20accdb77f6127a5480bf023231c7b0b6706b /docs/tutorials/wiki2/src/authentication
parent3f14d63c009ae7f101b7aeb4525bab2dfe66fa11 (diff)
parent87af11c5e33b8c03d57a8b571f0b152efe866af1 (diff)
downloadpyramid-9c15a8eac2848cc7a81f174ecf7a6c63be323f51.tar.gz
pyramid-9c15a8eac2848cc7a81f174ecf7a6c63be323f51.tar.bz2
pyramid-9c15a8eac2848cc7a81f174ecf7a6c63be323f51.zip
Merge branch 'master' into pr/2854
Diffstat (limited to 'docs/tutorials/wiki2/src/authentication')
-rw-r--r--docs/tutorials/wiki2/src/authentication/README.txt2
-rw-r--r--docs/tutorials/wiki2/src/authentication/tutorial/views/default.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorials/wiki2/src/authentication/README.txt b/docs/tutorials/wiki2/src/authentication/README.txt
index 5e21b8aa4..81102a869 100644
--- a/docs/tutorials/wiki2/src/authentication/README.txt
+++ b/docs/tutorials/wiki2/src/authentication/README.txt
@@ -1,5 +1,5 @@
myproj
-===============================
+======
Getting Started
---------------
diff --git a/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py b/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py
index 1b071434c..2d058d874 100644
--- a/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py
+++ b/docs/tutorials/wiki2/src/authentication/tutorial/views/default.py
@@ -1,4 +1,4 @@
-import cgi
+from pyramid.compat import escape
import re
from docutils.core import publish_parts
@@ -32,10 +32,10 @@ def view_page(request):
exists = request.dbsession.query(Page).filter_by(name=word).all()
if exists:
view_url = request.route_url('view_page', pagename=word)
- return '<a href="%s">%s</a>' % (view_url, cgi.escape(word))
+ return '<a href="%s">%s</a>' % (view_url, escape(word))
else:
add_url = request.route_url('add_page', pagename=word)
- return '<a href="%s">%s</a>' % (add_url, cgi.escape(word))
+ return '<a href="%s">%s</a>' % (add_url, escape(word))
content = publish_parts(page.data, writer_name='html')['html_body']
content = wikiwords.sub(add_link, content)