From 42e74bc677f3f59d6c6a77d371b70c8365ce2e27 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Wed, 23 Dec 2009 16:44:07 +0000 Subject: tweaking the regex for reduce_double_slashes to correctly handle duplicates at the beginning of the string --- system/helpers/string_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers') 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); } } -- cgit v1.2.3-24-g4f1b