mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
allow notebook names with spaces
This commit is contained in:
parent
5462cb4d9b
commit
b170c5dee0
@ -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:
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user