aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index e08d6e1ef5..4c9302dbbe 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -475,9 +475,10 @@ if ($hilit_words)
{
if (trim($word))
{
+ $word = preg_replace('#\s+#u', ' ', trim(preg_replace('#(?<=^|\s)\*(?=\s|$)#', '', $word)));
$word = str_replace('\*', '\w+?', preg_quote($word, '#'));
$word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word);
- $highlight_match .= (($highlight_match != '') ? '|' : '') . $word;
+ $highlight_match .= (($highlight_match != '' && $word != '') ? '|' : '') . $word;
}
}