aboutsummaryrefslogtreecommitdiff
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
parentlog dates (diff)
decodeURI
-rw-r--r--app.js5
-rw-r--r--package.json2
2 files changed, 4 insertions, 3 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));
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": {