diff options
author | Pascal Kriete <pascal.kriete@ellislab.com> | 2009-12-23 17:44:07 +0100 |
---|---|---|
committer | Pascal Kriete <pascal.kriete@ellislab.com> | 2009-12-23 17:44:07 +0100 |
commit | 42e74bc677f3f59d6c6a77d371b70c8365ce2e27 (patch) | |
tree | 2f7820bba139a5128aee2571031fd4ce09fbc907 | |
parent | 82d6ec41b5029141d10f30f5f6a791bbf7d14693 (diff) |
tweaking the regex for reduce_double_slashes to correctly handle duplicates at the beginning of the string
-rw-r--r-- | system/helpers/string_helper.php | 2 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 2 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); } } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 3ff05bb05..2b3a71ed0 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -96,6 +96,7 @@ SVN Revision: </p> <li>Fixed a bug in xss_clean() that was not allowing hyphens in query strings of submitted URLs.</li> <li>Fixed bugs in get_dir_file_info() and get_file_info() in the File Helper with recursion, and file paths on Windows.</li> <li>Fixed a bug where Active Record override parameter would not let you disable Active Record if it was enabled in your database config file.</li> + <li>Fixed a bug in reduce_double_slashes() in the String Helper to properly remove duplicate leading slashes (#7585)</li> </ul> <h2>Version 1.7.2</h2> |