diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/peoplesearch.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 323065d7a..f700cf46e 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -115,7 +115,8 @@ class PeoplesearchAction extends SearchAction { } function highlight($text, $terms) { - $pattern = '/('.implode('|',array_map('htmlspecialchars', $terms)).')/i'; + $terms = array_map('preg_quote', array_map('htmlspecialchars', $terms)); + $pattern = '/('.implode('|',$terms).')/i'; $result = preg_replace($pattern, '<strong>\\1</strong>', htmlspecialchars($text)); return $result; } |