From 457078f2cfcd114e84b33c123e83eab79e350d0c Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 29 Aug 2006 20:25:28 +0000 Subject: [PATCH] - only highlight when there is anything to highlight git-svn-id: file:///svn/phpbb/trunk@6330 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/search.php | 7 +++++-- 1 file 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))?)[^<]*)(?]*(?:)#is', '$1', $message); + if ($hilit) + { + // post highlighting + $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?]*(?:)#is', '$1', $message); + } $tpl_ary = array( 'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],