summaryrefslogtreecommitdiffstats
path: root/system/helpers/text_helper.php
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2012-08-31 04:38:28 +0200
committervlakoff <vlakoff@gmail.com>2012-08-31 04:38:28 +0200
commitcdbcbfc9dac126a87eaa34d411170ce198cb4ffe (patch)
tree2d62a347b09631876ca419e6d46e5505927c8525 /system/helpers/text_helper.php
parentb7c5444de271fb524f8a21d57f384fc0735175c0 (diff)
Simplification in Text Helper's character_limiter()
Because the "\s" regex character class includes \r and \n, there is no need for the str_replace() part
Diffstat (limited to 'system/helpers/text_helper.php')
-rw-r--r--system/helpers/text_helper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index 8a1f01b51..76dc04a70 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -89,7 +89,7 @@ if ( ! function_exists('character_limiter'))
return $str;
}
- $str = preg_replace('/\s+/', ' ', str_replace(array("\r\n", "\r", "\n"), ' ', $str));
+ $str = preg_replace('/\s+/', ' ', $str);
if (strlen($str) <= $n)
{