mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/10423] Remove * from search or highlight string
PHPBB3-10423
This commit is contained in:
@@ -475,9 +475,10 @@ if ($hilit_words)
|
||||
{
|
||||
if (trim($word))
|
||||
{
|
||||
$word = preg_replace('#\s+#u', ' ', trim(preg_replace('#(?<=^|\s)\*(?=\s|$)#', '', $word)));
|
||||
$word = str_replace('\*', '\w+?', preg_quote($word, '#'));
|
||||
$word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word);
|
||||
$highlight_match .= (($highlight_match != '') ? '|' : '') . $word;
|
||||
$highlight_match .= (($highlight_match != '' && $word != '') ? '|' : '') . $word;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user