From: Andrew Dolgov Date: Fri, 15 Dec 2017 05:33:59 +0000 (+0300) Subject: properly highlight search keywords containing forward slash X-Git-Tag: 18.8~99 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=0f05147531cb82ed3c6d298be9b3eca63192c81f;p=tt-rss.git properly highlight search keywords containing forward slash --- 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"]); } }