Properly handle the allow_slash parameter for regexes that have one or more end-of-string characters.

develop
Sven Slootweg 12 years ago
parent f4f15d9cd1
commit e864e912d0

@ -63,7 +63,14 @@ class CPHPRouter extends CPHPBaseClass
{
if($this->allow_slash === true)
{
$route_regex = "{$route_regex}/?";
if(strpos($route_regex, "$") !== false)
{
$route_regex = str_replace("$", "/?$", $route_regex);
}
else
{
$route_regex = "{$route_regex}/?";
}
}
$regex = str_replace("/", "\/", $route_regex);

Loading…
Cancel
Save