summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2009-12-23 17:44:07 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2009-12-23 17:44:07 +0100
commit42e74bc677f3f59d6c6a77d371b70c8365ce2e27 (patch)
tree2f7820bba139a5128aee2571031fd4ce09fbc907 /system/helpers
parent82d6ec41b5029141d10f30f5f6a791bbf7d14693 (diff)
tweaking the regex for reduce_double_slashes to correctly handle duplicates at the beginning of the string
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/string_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 3f7f09a15..dbfa0c41a 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -140,7 +140,7 @@ if ( ! function_exists('reduce_double_slashes'))
{
function reduce_double_slashes($str)
{
- return preg_replace("#([^:])//+#", "\\1/", $str);
+ return preg_replace("#(^|[^:])//+#", "\\1/", $str);
}
}