From 8b555a59036b71cd78005355f7050bce61b2e18f Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Wed, 5 Aug 2009 19:40:48 +0000 Subject: [PATCH] - bugfix mb_string support --- libs/plugins/modifier.strip.php | 4 ++-- libs/plugins/modifier.strip_tags.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/plugins/modifier.strip.php b/libs/plugins/modifier.strip.php index 08f7b106..1890263b 100644 --- a/libs/plugins/modifier.strip.php +++ b/libs/plugins/modifier.strip.php @@ -12,7 +12,7 @@ * Type: modifier
* Name: strip
* Purpose: Replace all repeated spaces, newlines, tabs -* with a single space or supplied replacement string.
+* with a single space or supplied replacement string.
* Example: {$var|strip} {$var|strip:" "} * Date: September 25th, 2002 * @@ -27,7 +27,7 @@ function smarty_modifier_strip($text, $replace = ' ') { $smarty = Smarty::instance(); if ($smarty->has_mb) { - return mb_ereg_replace('!\s+!', $replace, $text, 'p'); + return mb_ereg_replace("\s+", $replace, $text, 'p'); } else { return preg_replace('!\s+!', $replace, $text); } diff --git a/libs/plugins/modifier.strip_tags.php b/libs/plugins/modifier.strip_tags.php index f93953b8..1bd406d2 100644 --- a/libs/plugins/modifier.strip_tags.php +++ b/libs/plugins/modifier.strip_tags.php @@ -24,7 +24,7 @@ function smarty_modifier_strip_tags($string, $replace_with_space = true) $smarty = Smarty::instance(); if ($replace_with_space) { if ($smarty->has_mb) { - return mb_ereg_replace('!<[^>]*?>!', ' ', $string, 'p'); + return mb_ereg_replace("<[^>]*?>", ' ', $string, 'p'); } else { return preg_replace('!<[^>]*?>!', ' ', $string); }