From f2c5e6ba98a573e4d76659a2edec84cb7edf2291 Mon Sep 17 00:00:00 2001 From: Thomas Kluyver Date: Thu, 23 Jul 2015 14:48:38 -0700 Subject: [PATCH] Catch error adding link to notebook list Part of the fix for gh-223. If a filename can't be decoded in the current encoding, Python escapes the undecodable bytes as unpaired surrogates, which JS doesn't like building a URL from. This doesn't make the undecodable filename openable, but it stops it from breaking the listing of other files. The real fix is to set up the locale encoding correctly so that the filenames can be decoded. --- notebook/static/tree/js/notebooklist.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notebook/static/tree/js/notebooklist.js b/notebook/static/tree/js/notebooklist.js index 6308d7ff6..1ef1a5228 100644 --- a/notebook/static/tree/js/notebooklist.js +++ b/notebook/static/tree/js/notebooklist.js @@ -295,7 +295,11 @@ define([ for (var i=0; i