aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJohannes <johannes@cloudron.io>2016-11-06 15:22:45 +0100
committerJohannes <johannes@cloudron.io>2016-11-06 15:22:45 +0100
commit5f43935e567855125be9ffae1108cb6212cb8d93 (patch)
tree6242abfa9fad74d4b94d4f94a7297a65ad05c740
parent94ff5399e8f067a1beef899950c789be64ab36f3 (diff)
downloadSurfer-5f43935e567855125be9ffae1108cb6212cb8d93.tar.gz
Surfer-5f43935e567855125be9ffae1108cb6212cb8d93.tar.zst
Surfer-5f43935e567855125be9ffae1108cb6212cb8d93.zip
ensure we deal with encoding of paths correctly on the client
-rw-r--r--app/js/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/js/app.js b/app/js/app.js
index f207de6..b26a2a6 100644
--- a/app/js/app.js
+++ b/app/js/app.js
@@ -105,18 +105,18 @@ function loadDirectory(filePath) {
105} 105}
106 106
107function open(entry) { 107function open(entry) {
108 var path = encode(sanitize(app.path + '/' + entry.filePath)); 108 var path = sanitize(app.path + '/' + entry.filePath);
109 109
110 if (entry.isDirectory) { 110 if (entry.isDirectory) {
111 window.location.hash = path; 111 window.location.hash = path;
112 return; 112 return;
113 } 113 }
114 114
115 window.open(path); 115 window.open(encode(path));
116} 116}
117 117
118function up() { 118function up() {
119 window.location.hash = encode(sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'))); 119 window.location.hash = sanitize(app.path.split('/').slice(0, -1).filter(function (p) { return !!p; }).join('/'));
120} 120}
121 121
122function upload() { 122function upload() {