From 5768fc7c11e17553399229f099e760b45c7b2808 Mon Sep 17 00:00:00 2001 From: Colin Jermain Date: Tue, 17 Nov 2015 18:48:21 -0500 Subject: [PATCH] BUG: use url_escape to encode URL for browser --- notebook/notebookapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index c74e4eb48..c9badd0b8 100644 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -83,7 +83,7 @@ from ipython_genutils import py3compat from jupyter_core.paths import jupyter_runtime_dir, jupyter_path from notebook._sysinfo import get_sys_info -from .utils import url_path_join, check_pid +from .utils import url_path_join, check_pid, url_escape #----------------------------------------------------------------------------- # Module globals @@ -1094,7 +1094,7 @@ class NotebookApp(JupyterApp): self.exit(1) relpath = os.path.relpath(self.file_to_run, self.notebook_dir) - uri = url_path_join('notebooks', *relpath.split(os.sep)) + uri = url_escape(url_path_join('notebooks', *relpath.split(os.sep))) else: uri = 'tree' if browser: