Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Merge pull request #115 from sunlaud/master
Browse files Browse the repository at this point in the history
Fixed bug with unsupported unicode chars in files/pages names by embedded server
  • Loading branch information
laktek committed Aug 10, 2014
2 parents 445a435 + 793cec1 commit 65bcf24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/page_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ module.exports = {
var self = this;

var parsed_url = Url.parse(request.url, true);
var request_path = parsed_url.pathname.replace(/\.\.\/|\/$/g, "") || '/index';
var request_path = decodeURIComponent(parsed_url.pathname.replace(/\+/g, " ")).replace(/\.\.\/|\/$/g, "") || '/index';

var file_extension = PathUtils.getExtension(request_path, (request.accept && request.accept.types));
var request_basename = PathUtils.getBasename(request_path, file_extension);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"bin": "bin/punch",
"dependencies": {
"coffee-script": ">= 1.5.0",
"connect": ">= 2.12.0",
"connect": "~ 2.21.0",
"cssmin": ">= 0.4.1",
"fresh": ">= 0.1.0",
"fstream": ">= 0.1.18",
Expand Down

0 comments on commit 65bcf24

Please sign in to comment.