Commit 3cffaf58 authored by Taylor Otwell's avatar Taylor Otwell

Changed (:any) wildcard to more restrictive.

parent 0db0dade
...@@ -55,7 +55,7 @@ class Router { ...@@ -55,7 +55,7 @@ class Router {
// -------------------------------------------------------------- // --------------------------------------------------------------
// Convert the route wild-cards to regular expressions. // Convert the route wild-cards to regular expressions.
// -------------------------------------------------------------- // --------------------------------------------------------------
$route = str_replace(':num', '[0-9]+', str_replace(':any', '.+', $route)); $route = str_replace(':num', '[0-9]+', str_replace(':any', '[a-zA-Z0-9\-_]+', $route));
if (preg_match('#^'.$route.'$#', $method.' '.$uri)) if (preg_match('#^'.$route.'$#', $method.' '.$uri))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment