From 6abc1c7c976dccdb94e586e039e56d395326deb3 Mon Sep 17 00:00:00 2001 From: Daan Poron Date: Thu, 14 Mar 2013 16:46:40 +0100 Subject: [PATCH] limit the character set for parameters limiting the character set for parameters makes it possible for example to add regular expressions after parameters. Before the regexp was seen as part of the parameter name. Also i don't think you want to use any special characters in the parameter names like %:*... --- lib/director/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/director/router.js b/lib/director/router.js index 0640961..ba6cfd7 100644 --- a/lib/director/router.js +++ b/lib/director/router.js @@ -103,7 +103,7 @@ function regifyString(str, params) { str = out += str.substr(last); - var captures = str.match(/:([^\/]+)/ig), + var captures = str.match(/:([a-zA-Z0-9_-]+)/ig), length; if (captures) {