From 95388539053e244369c17a969ae6a969b0c2725e Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Fri, 16 Aug 2019 09:41:17 -0700 Subject: [PATCH] Do not try to overly escape the notebook version info anymore. --- jupyterlab/extension.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/jupyterlab/extension.py b/jupyterlab/extension.py index f82aedf60247..1d6599a64ab6 100644 --- a/jupyterlab/extension.py +++ b/jupyterlab/extension.py @@ -140,14 +140,7 @@ def load_jupyter_server_extension(nbapp): page_config['buildCheck'] = not core_mode and not dev_mode page_config['devMode'] = dev_mode page_config['token'] = nbapp.token - - # Export the version info tuple to a JSON array. This gets printed - # inside double quote marks, so we render it to a JSON string of the - # JSON data (so that we can call JSON.parse on the frontend on it). - # We also have to wrap it in `Markup` so that it isn't escaped - # by Jinja. Otherwise, if the version has string parts these will be - # escaped and then will have to be unescaped on the frontend. - page_config['notebookVersion'] = Markup(dumps(dumps(version_info))[1:-1]) + page_config['notebookVersion'] = version_info if nbapp.file_to_run and type(nbapp).__name__ == "LabApp": relpath = os.path.relpath(nbapp.file_to_run, nbapp.notebook_dir)