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/viewtopic.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 52c2c2c128..b9bd6810ab 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1171,9 +1171,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // Highlight active words (primarily for search) if ($highlight_match) { - // This was shamelessly 'borrowed' from volker at multiartstudio dot de - // via php.net's annotated manual - $message = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '\\\\1', '\\0')", '>' . $message . '<'), 1, -1)); + $message = preg_replace('#(?!<.*)(?]*>)#i', '\1', $message); } if ($row['enable_html'] && $auth->acl_get('f_html', $forum_id)) -- cgit v1.2.1