From 813711e6ddfa347fd0d74c109c14fe10a919f668 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 4 Sep 2006 07:13:57 +0000 Subject: --- system/libraries/Router.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Router.php') diff --git a/system/libraries/Router.php b/system/libraries/Router.php index 1c67113f6..c7e855a78 100644 --- a/system/libraries/Router.php +++ b/system/libraries/Router.php @@ -312,12 +312,12 @@ class CI_Router { $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key)); // Does the RegEx match? - if (preg_match('|^'.$key.'$|', $uri)) + if (preg_match('#^'.preg_quote($key).'$#', $uri)) { // Do we have a back-reference? if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE) { - $val = preg_replace('|^'.$key.'$|', $val, $uri); + $val = preg_replace('#^'.preg_quote($key).'$#', $val, $uri); } $this->_compile_segments(explode('/', $val)); -- cgit v1.2.3-24-g4f1b