Updated Request::instance() to reduce multiple slashes to a single slash, and remove all dot-paths

This commit is contained in:
Woody Gilk 2009-06-19 09:50:02 -05:00
parent 977cc01071
commit f9b461fe2f

View file

@ -195,6 +195,12 @@ class Kohana_Request {
}
}
// Reduce multiple slashes to a single slash
$uri = preg_replace('#//+#', '/', $uri);
// Remove all dot-paths from the URI, they are not valid
$uri = preg_replace('#\.[\s./]*/#', '', $uri);
// Create the instance singleton
Request::$instance = new Request($uri);
}