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 | |
parent | log dates (diff) |
decodeURI
-rw-r--r-- | app.js | 5 | ||||
-rw-r--r-- | package.json | 2 |
2 files changed, 4 insertions, 3 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)); diff --git a/package.json b/package.json index 8095c86..ec240bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-preview", - "version": "1.0.0", + "version": "1.1.0", "description": "", "main": "app.js", "scripts": { |