commit | 42e74bc677f3f59d6c6a77d371b70c8365ce2e27 | [log] [tgz] |
---|---|---|
author | Pascal Kriete <pascal.kriete@ellislab.com> | Wed Dec 23 16:44:07 2009 +0000 |
committer | Pascal Kriete <pascal.kriete@ellislab.com> | Wed Dec 23 16:44:07 2009 +0000 |
tree | 2f7820bba139a5128aee2571031fd4ce09fbc907 | |
parent | 82d6ec41b5029141d10f30f5f6a791bbf7d14693 [diff] [blame] |
tweaking the regex for reduce_double_slashes to correctly handle duplicates at the beginning of the string
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php index 3f7f09a..dbfa0c4 100644 --- a/system/helpers/string_helper.php +++ b/system/helpers/string_helper.php
@@ -140,7 +140,7 @@ { function reduce_double_slashes($str) { - return preg_replace("#([^:])//+#", "\\1/", $str); + return preg_replace("#(^|[^:])//+#", "\\1/", $str); } }