diff options
author | ache <ache@ache.one> | 2019-11-17 00:05:50 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2019-11-17 00:05:50 +0100 |
commit | 5d17ec8cf7480ad3d34a1d2d4b06b3a406c1529a (patch) | |
tree | b781320b89e430a358b21ec1cfab59fe6ba6e0cd | |
parent | Add save button (diff) |
-rw-r--r-- | app.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -98,7 +98,7 @@ app.get('/', (req, res) => { app.get('/edit/?*', (req, res) => { console.log(`[${new Date()}] > ${200} - ${req.url}`); - const pathReq = path.normalize(`md/${req.url.slice(5)}`); + const pathReq = decodeURIComponent(path.normalize(`md/${req.url.slice(5)}`)); console.log(`[${new Date()}] > ${200} - ${pathReq}`); @@ -111,7 +111,7 @@ app.get('/edit/?*', (req, res) => { }); }); app.put('/edit/?*', (req, res) => { - const pathR = path.normalize(`md${req.url.slice(5)}`); + const pathR = decodeURIComponent(path.normalize(`md${req.url.slice(5)}`)); console.log('PUT !'); console.log(pathR); if (pathR.startsWith('md/public') || |