summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-09-04 09:13:57 +0200
committeradmin <devnull@localhost>2006-09-04 09:13:57 +0200
commit813711e6ddfa347fd0d74c109c14fe10a919f668 (patch)
tree2edb3d9765568245485a4160db22cea7b0fa765d
parentd7bb13b67294da6f0e0accccf6f992465665c149 (diff)
-rw-r--r--system/libraries/Config.php2
-rw-r--r--system/libraries/Router.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Config.php b/system/libraries/Config.php
index 532f70d42..108c94ab7 100644
--- a/system/libraries/Config.php
+++ b/system/libraries/Config.php
@@ -229,7 +229,7 @@ class CI_Config {
function system_url()
{
$x = explode("/", preg_replace("|/*(.+?)/*$|", "\\1", BASEPATH));
- return $this->item('base_url', 1).end($x).'/';
+ return $this->slash_item('base_url').end($x).'/';
}
// END system_url()
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));