diff --git a/notebook/view/handlers.py b/notebook/view/handlers.py index 4496a5294..3e89faccc 100644 --- a/notebook/view/handlers.py +++ b/notebook/view/handlers.py @@ -17,7 +17,7 @@ class ViewHandler(IPythonHandler): raise web.HTTPError(404, u'File does not exist: %s' % path) basename = path.rsplit('/', 1)[-1] - file_url = url_path_join(self.base_url, 'files', path) + file_url = url_path_join(self.base_url, 'files', url_escape(path)) self.write( self.render_template('view.html', file_url=file_url, page_title=basename) )