aboutsummaryrefslogtreecommitdiff
path: root/mod/search
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-21 19:37:19 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-21 19:37:19 +0000
commitc3cbea030adb2201e29897915bfae19f1628c967 (patch)
tree5074fc8f4daf8aeb478303686dc14bee634bef4f /mod/search
parentfba5064ee96fbe84148a1d1ea6d170fcd3499ee1 (diff)
downloadelgg-c3cbea030adb2201e29897915bfae19f1628c967.tar.gz
elgg-c3cbea030adb2201e29897915bfae19f1628c967.tar.bz2
Merging r6517:6520 from 1.7 branch
git-svn-id: http://code.elgg.org/elgg/trunk@6839 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/search')
-rw-r--r--mod/search/start.php2
1 files changed, 2 insertions, 0 deletions
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