- added Smarty::$_UTF8_MODIFIER for proper PCRE charset handling (Forum Topic 20452)

This commit is contained in:
rodneyrehm
2011-12-18 18:48:07 +00:00
14 changed files with 42 additions and 22 deletions

View File

@@ -84,7 +84,7 @@ function smarty_block_textformat($params, $content, $template, &$repeat)
continue;
}
// convert mult. spaces & special chars to single space
$_paragraph = preg_replace(array('!\s+!u', '!(^\s+)|(\s+$)!u'), array(' ', ''), $_paragraph);
$_paragraph = preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER), array(' ', ''), $_paragraph);
// indent first line
if ($indent_first > 0) {
$_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph;