ignore case when highlighting

darcs-hash:20080709215011-84dde-29c80d3210e337614980b647c58b5720b7bfc35f.gz
This commit is contained in:
Evan Prodromou 2008-07-09 17:50:11 -04:00
parent 2d3ba299b8
commit 0ec918604a

View File

@ -132,7 +132,7 @@ class PeoplesearchAction extends Action {
}
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);
return $result;
}