diff --git a/includes/unicode.inc b/includes/unicode.inc index fd497cc..7340ecd 100644 --- a/includes/unicode.inc +++ b/includes/unicode.inc @@ -341,7 +341,7 @@ function truncate_utf8($string, $max_length, $wordsafe = FALSE, $add_ellipsis = // Find the last word boundary, if there is one within $min_wordsafe_length // to $max_length characters. preg_match() is always greedy, so it will // find the longest string possible. - $found = preg_match('/^(.{' . $min_wordsafe_length . ',' . $max_length . '})[' . PREG_CLASS_UNICODE_WORD_BOUNDARY . ']/u', $string, $matches); + $found = preg_match('/^(.{' . $min_wordsafe_length . ',' . $max_length . '})[' . PREG_CLASS_UNICODE_WORD_BOUNDARY . ']/us', $string, $matches); if ($found) { $string = $matches[1]; }