From c3cbea030adb2201e29897915bfae19f1628c967 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 21 Aug 2010 19:37:19 +0000 Subject: Merging r6517:6520 from 1.7 branch git-svn-id: http://code.elgg.org/elgg/trunk@6839 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/start.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mod/search/start.php') diff --git a/mod/search/start.php b/mod/search/start.php index 3467420b7..781afb8ec 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -259,6 +259,8 @@ function search_highlight_words($words, $string) { ); foreach ($words as $word) { + // escape the delimiter and any other regexp special chars + $word = preg_quote($word, '/'); $search = "/($word)/i"; // must replace with placeholders in case one of the search terms is -- cgit v1.2.3