Skip to content

Commit

Permalink
Do not try to overly escape the notebook version info anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongrout committed Aug 16, 2019
1 parent 228ee91 commit 9538853
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions jupyterlab/extension.py
Expand Up @@ -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)
Expand Down

0 comments on commit 9538853

Please sign in to comment.