mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
- check if mb string functions available otherwise fallback to normal string functions
This commit is contained in:
@@ -72,7 +72,11 @@ function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null)
|
||||
|
||||
case 'mail':
|
||||
// safe way to display e-mail address on a web page
|
||||
return mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
|
||||
if ($smarty->has_mb) {
|
||||
return mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
|
||||
} else {
|
||||
return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
|
||||
}
|
||||
|
||||
case 'nonstd':
|
||||
// escape non-standard chars, such as ms document quotes
|
||||
|
||||
Reference in New Issue
Block a user