specialchars() text in search results
darcs-hash:20080709225942-84dde-80c201825f566af717456f13d17e7382ce234692.gz
This commit is contained in:
parent
09e1b247f9
commit
7469d14787
|
@ -158,7 +158,7 @@ class PeoplesearchAction extends Action {
|
|||
|
||||
function highlight($text, $terms) {
|
||||
$pattern = '/('.implode('|',array_map('htmlspecialchars', $terms)).')/i';
|
||||
$result = preg_replace($pattern, '<strong>\\1</strong>', $text);
|
||||
$result = preg_replace($pattern, '<strong>\\1</strong>', htmlspecialchars($text));
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user