mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 05:48:51 +00:00
trimmed the highlight regex
git-svn-id: file:///svn/phpbb/trunk@6550 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
8b0ec6e02d
commit
1544f45621
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue