diff options
-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') || |