Don't "hightlight" search terms (by surrounding them in <strong>$term</strong>) when the term appears in an HTML attribute
Fixes http://status.net/trac/ticket/1852
This commit is contained in:
parent
c77c0d88ce
commit
6020d85191
|
@ -198,7 +198,7 @@ class SearchNoticeListItem extends NoticeListItem {
|
|||
$result = preg_replace($pattern, '<strong>\\1</strong>', $text);
|
||||
|
||||
/* Remove highlighting from inside links, loop incase multiple highlights in links */
|
||||
$pattern = '/(href="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
|
||||
$pattern = '/(\w+="[^"]*)<strong>('.$options.')<\/strong>([^"]*")/iU';
|
||||
do {
|
||||
$result = preg_replace($pattern, '\\1\\2\\3', $result, -1, $count);
|
||||
} while ($count);
|
||||
|
|
Loading…
Reference in New Issue
Block a user