diff --git a/IPython/html/notebook/handlers.py b/IPython/html/notebook/handlers.py index 7df96f1..be27df5 100644 --- a/IPython/html/notebook/handlers.py +++ b/IPython/html/notebook/handlers.py @@ -22,6 +22,7 @@ HTTPError = web.HTTPError from ..base.handlers import IPythonHandler from ..utils import url_path_join +from urllib import quote #----------------------------------------------------------------------------- # Handlers @@ -50,6 +51,8 @@ class NamedNotebookHandler(IPythonHandler): def get(self, notebook_path): nbm = self.notebook_manager name, path = nbm.named_notebook_path(notebook_path) + if name != None: + name = quote(name) if path == None: project = self.project + '/' + name else: diff --git a/IPython/html/tree/handlers.py b/IPython/html/tree/handlers.py index 0ceabad..cb97f38 100644 --- a/IPython/html/tree/handlers.py +++ b/IPython/html/tree/handlers.py @@ -53,7 +53,7 @@ class ProjectPathDashboardHandler(IPythonHandler): project=project, project_component=project.split('/'), notebook_path=path, - notebook_name=name)) + notebook_name=quote(name))) class TreeRedirectHandler(IPythonHandler):