mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 13:58:54 +00:00
- only highlight when there is anything to highlight
git-svn-id: file:///svn/phpbb/trunk@6330 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1564013fdd
commit
457078f2cf
1 changed files with 5 additions and 2 deletions
|
@ -808,8 +808,11 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$message = smiley_text($message);
|
||||
}
|
||||
|
||||
// post highlighting
|
||||
$message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $message);
|
||||
if ($hilit)
|
||||
{
|
||||
// post highlighting
|
||||
$message = preg_replace('#(?!(?:<(?:s(?:cript|tyle))?)[^<]*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $message);
|
||||
}
|
||||
|
||||
$tpl_ary = array(
|
||||
'POSTER_NAME' => ($row['poster_id'] == ANONYMOUS) ? ((!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']) : $row['username'],
|
||||
|
|
Loading…
Add table
Reference in a new issue