forked from GNUsocial/gnu-social
ignore case when highlighting
darcs-hash:20080709215011-84dde-29c80d3210e337614980b647c58b5720b7bfc35f.gz
This commit is contained in:
parent
2d3ba299b8
commit
0ec918604a
@ -132,7 +132,7 @@ class PeoplesearchAction extends Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function highlight($text, $terms) {
|
function highlight($text, $terms) {
|
||||||
$pattern = '/('.implode('|',array_map('htmlspecialchars', $terms)).')/';
|
$pattern = '/('.implode('|',array_map('htmlspecialchars', $terms)).')/i';
|
||||||
$result = preg_replace($pattern, '<strong>\\1</strong>', $text);
|
$result = preg_replace($pattern, '<strong>\\1</strong>', $text);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user