mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-10 13:24:27 +02:00
- bugfix mb_string support
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
@@ -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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user