aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/search.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index ae3d9b73a3..a2feeab37c 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -808,8 +808,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
$message = smiley_text($message);
}
- // post highlighting
- $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $message);
+ if ($hilit)
+ {
+ // post highlighting
+ $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $message);
+ }
$tpl_ary = array(
'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],