From: Evan Prodromou Date: Wed, 9 Jul 2008 22:59:42 +0000 (-0400) Subject: specialchars() text in search results X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7469d147878314a7a121c32f05e043a9ef6d0850;p=quix0rs-gnu-social.git specialchars() text in search results darcs-hash:20080709225942-84dde-80c201825f566af717456f13d17e7382ce234692.gz --- diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 045d99e39a..5d10140173 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -158,7 +158,7 @@ class PeoplesearchAction extends Action { function highlight($text, $terms) { $pattern = '/('.implode('|',array_map('htmlspecialchars', $terms)).')/i'; - $result = preg_replace($pattern, '\\1', $text); + $result = preg_replace($pattern, '\\1', htmlspecialchars($text)); return $result; } }