aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app.js b/app.js
index 71ad164..79c8085 100644
--- a/app.js
+++ b/app.js
@@ -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') ||