diff options
author | Arnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr> | 2017-10-02 10:02:32 +0200 |
---|---|---|
committer | Arnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr> | 2017-10-02 10:02:32 +0200 |
commit | 3d0bdc3581c64a0cb8eaeb0bd52dde49eee36348 (patch) | |
tree | 70055f720e7c621169203dad357856e5fe2ea697 /app.js | |
parent | log dates (diff) |
decodeURI
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -25,8 +25,9 @@ converter.setOption('tasklists', 'true'); app.use(express.static('public')); app.get('/' + path + '/*', function(req, res) { - console.log("[" + new Date() + "] > " + "200 - " + req.url); - fs.readFile(req.url.substr(1), 'utf8', function(err, data) { + var url = decodeURI(req.url); + console.log("[" + new Date() + "] > " + "200 - " + url); + fs.readFile(url.substr(1), 'utf8', function(err, data) { if (err) return console.log(err); res.send(converter.makeHtml(data)); |