Permalink
Browse files

Don't convert non-strings to strings by calling unescape on them. (Th…

…anks orlandov)
  • Loading branch information...
1 parent 30ccb40 commit 996a2bb91eb190d30616ef205d3398da8f60eb81 @creationix committed Apr 9, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/node-router.js
View
@@ -211,7 +211,9 @@ exports.getServer = function getServer(logger) {
var match = path.match(route.pattern);
if (match && match[0].length > 0) {
match.shift();
- match = match.map(unescape);
+ match = match.map(function (part) {
+ return part ? unescape(part) : part;
+ });
match.unshift(res);
match.unshift(req);
if (route.format !== undefined) {

0 comments on commit 996a2bb

Please sign in to comment.