From 0f05147531cb82ed3c6d298be9b3eca63192c81f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 15 Dec 2017 08:33:59 +0300 Subject: [PATCH] properly highlight search keywords containing forward slash --- classes/feeds.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/feeds.php b/classes/feeds.php index 58661994..64880b02 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -557,7 +557,9 @@ class Feeds extends Handler_Protected { if ($highlight_words && count($highlight_words) > 0) { foreach ($highlight_words as $word) { - $line["title"] = preg_replace("/(\Q$word\E)/i", + $word = preg_quote($word, "/"); + + $line["title"] = preg_replace("/($word)/i", "$1", $line["title"]); } }