From f961d4a839a76a423b212c716776d583b8d120e9 Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 21 Mar 2014 13:08:56 -0700 Subject: [PATCH] urlencode the folder name in the title --- st.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/st.js b/st.js index ea5db0d..2d3a929 100644 --- a/st.js +++ b/st.js @@ -439,12 +439,18 @@ Mount.prototype.streamFile = function (p, fd, stat, etag, req, res, end) { Mount.prototype._loadIndex = function (p, cb) { // truncate off the first bits var url = p.substr(this.path.length).replace(/\\/g, '/') + var t = url + .replace(/"/g, '"') + .replace(/>/g, '<') + .replace(/' + - 'Index of ' + url + '' + + 'Index of ' + t + '' + '' + - '

Index of ' + url + '

' + + '

Index of ' + t + '

' + '
../\n'
 
   this.cache.readdir.get(p, function (er, data) {