diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d3638f1941..6d9623245a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2132,7 +2132,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po function get_context($text, $words, $length = 400) { // first replace all whitespaces with single spaces - $text = preg_replace('/\s+/u', ' ', $text); + $text = preg_replace('/ +/', ' ', strtr($text, "\t\n\r\x0C ", ' '), $text); $word_indizes = array(); if (sizeof($words))