aboutsummaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorArnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr>2017-10-02 10:02:32 +0200
committerArnaud CHESNAY <arnaud.chesnay@etu.univ-nantes.fr>2017-10-02 10:02:32 +0200
commit3d0bdc3581c64a0cb8eaeb0bd52dde49eee36348 (patch)
tree70055f720e7c621169203dad357856e5fe2ea697 /app.js
parentlog dates (diff)
decodeURI
Diffstat (limited to 'app.js')
-rw-r--r--app.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/app.js b/app.js
index 0c4aa64..de17c41 100644
--- a/app.js
+++ b/app.js
@@ -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));