From 224294c2743df1df2855ea511ad4f612080472b0 Mon Sep 17 00:00:00 2001 From: Grant Nestor Date: Tue, 24 Jan 2017 19:58:28 -0800 Subject: [PATCH] Use `/view` route for HTML files --- notebook/static/tree/js/notebooklist.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notebook/static/tree/js/notebooklist.js b/notebook/static/tree/js/notebooklist.js index 819d3d732..d68bad122 100644 --- a/notebook/static/tree/js/notebooklist.js +++ b/notebook/static/tree/js/notebooklist.js @@ -959,7 +959,8 @@ define([ var that = this; that.selected.forEach(function(item) { var item_path = utils.encode_uri_components(item.path); - var w = window.open(utils.url_path_join(that.base_url, '/files', utils.encode_uri_components(item_path)), IPython._target); + var item_type = item_path.endsWith('.html') ? 'view' : 'files'; + var w = window.open(utils.url_path_join(that.base_url, item_type, utils.encode_uri_components(item_path)), IPython._target); }); };