- bugfix mb_string support

This commit is contained in:
Uwe.Tews
2009-08-05 19:40:48 +00:00
parent 83cc212060
commit 8b555a5903
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,7 @@ function smarty_modifier_strip($text, $replace = ' ')
{ {
$smarty = Smarty::instance(); $smarty = Smarty::instance();
if ($smarty->has_mb) { if ($smarty->has_mb) {
return mb_ereg_replace('!\s+!', $replace, $text, 'p'); return mb_ereg_replace("\s+", $replace, $text, 'p');
} else { } else {
return preg_replace('!\s+!', $replace, $text); return preg_replace('!\s+!', $replace, $text);
} }

View File

@@ -24,7 +24,7 @@ function smarty_modifier_strip_tags($string, $replace_with_space = true)
$smarty = Smarty::instance(); $smarty = Smarty::instance();
if ($replace_with_space) { if ($replace_with_space) {
if ($smarty->has_mb) { if ($smarty->has_mb) {
return mb_ereg_replace('!<[^>]*?>!', ' ', $string, 'p'); return mb_ereg_replace("<[^>]*?>", ' ', $string, 'p');
} else { } else {
return preg_replace('!<[^>]*?>!', ' ', $string); return preg_replace('!<[^>]*?>!', ' ', $string);
} }