aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 6b5c2f411d..04505d07f0 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -407,7 +407,9 @@ if ($hilit_words)
{
if (trim($word))
{
- $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('\*', '\w+?', preg_quote($word, '#'));
+ $word = str_replace('\*', '\w+?', preg_quote($word, '#'));
+ $word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word);
+ $highlight_match .= (($highlight_match != '') ? '|' : '') . $word;
}
}