summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Grainger <tagrain@gmail.com>2012-09-05 02:12:43 +0200
committerMarcel Hellkamp <marc@gsites.de>2012-09-16 23:15:09 +0200
commitd729bcb2d6eecac8b92d60dd547779f5961d49a1 (patch)
treedaaccbe2ba51889b968e460680a25a7d83c7a84e
parent2ed157cfff2f895d11cd1470359786bd3de79500 (diff)
downloadbottle-d729bcb2d6eecac8b92d60dd547779f5961d49a1.tar.gz
Fix XSS vulnerability in hello world example
-rwxr-xr-xdocs/index.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 9179c4a..1bb081b 100755
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -31,11 +31,11 @@ Bottle is a fast, simple and lightweight WSGI_ micro web-framework for Python_.
::
- from bottle import route, run
+ from bottle import route, run, template
@route('/hello/:name')
def index(name='World'):
- return '<b>Hello %s!</b>' % name
+ return template('<b>Hello {{name}}</b>!', name=name)
run(host='localhost', port=8080)