aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-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