mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-18 15:41:26 +02:00
trimmed the highlight regex
git-svn-id: file:///svn/phpbb/trunk@6550 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -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(
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user