mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-05 12:14:12 +02:00
- added Smarty::$_UTF8_MODIFIER for proper PCRE charset handling (Forum Topic 20452)
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
function smarty_modifiercompiler_count_characters($params, $compiler)
|
||||
{
|
||||
if (!isset($params[1]) || $params[1] != 'true') {
|
||||
return 'preg_match_all(\'/[^\s]/u\',' . $params[0] . ', $tmp)';
|
||||
return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[0] . ', $tmp)';
|
||||
}
|
||||
if (Smarty::$_MBSTRING) {
|
||||
return 'mb_strlen(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
|
||||
|
||||
Reference in New Issue
Block a user