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 +- user_guide/changelog.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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:

  • Fixed a bug in xss_clean() that was not allowing hyphens in query strings of submitted URLs.
  • Fixed bugs in get_dir_file_info() and get_file_info() in the File Helper with recursion, and file paths on Windows.
  • Fixed a bug where Active Record override parameter would not let you disable Active Record if it was enabled in your database config file.
  • +
  • Fixed a bug in reduce_double_slashes() in the String Helper to properly remove duplicate leading slashes (#7585)
  • Version 1.7.2

    -- cgit v1.2.3-24-g4f1b