diff options
-rw-r--r-- | phpBB/search.php | 2 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index 5418f34c6b..b16a92384e 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -825,7 +825,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) if ($hilit) { // post highlighting - $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $message); + $message = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $message); } $tpl_ary = array( diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 4275938548..0bcaea8489 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1299,7 +1299,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // Highlight active words (primarily for search) if ($highlight_match) { - $message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $message); + $message = preg_replace('#(?!<.*)(?<!\w)(' . $highlight_match . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">\1</span>', $message); } // Replace naughty words such as farty pants |