From 5bf738d345ff5f874e7d302d95663ffed56751e2 Mon Sep 17 00:00:00 2001 From: David M Date: Tue, 27 Dec 2005 13:59:15 +0000 Subject: - Replaced the old 2.0.x highlight code with much nicer code :-) git-svn-id: file:///svn/phpbb/trunk@5381 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/search.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/search.php') diff --git a/phpBB/search.php b/phpBB/search.php index 0e5437b27c..e2c68409c3 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -528,9 +528,7 @@ if ($keywords || $author || $search_id || $search_session_id) if ($hilit) { - // This was shamelessly 'borrowed' from volker at multiartstudio dot de - // via php.net's annotated manual - $row['post_text'] = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . str_replace('\\', '\\\\', $hilit) . ")\b#i', '\\\\1', '\\0')", '>' . $row['post_text'] . '<'), 1, -1)); + $row['post_text'] = preg_replace('#(?!<.*)(?]*>)#i', '\1', $row['post_text']); } $row['post_text'] = smiley_text($row['post_text']); -- cgit v1.2.1