]> git.wh0rd.org - tt-rss.git/blobdiff - classes/feeds.php
properly highlight search keywords containing forward slash
[tt-rss.git] / classes / feeds.php
index 58661994540f4bad520ee74909def6818a9e92c0..64880b02d9aca408d17026a95897524b2fcd6be0 100755 (executable)
@@ -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",
                                                                "<span class=\"highlight\">$1</span>", $line["title"]);
                                                }
                                        }