mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 23:05:56 +00:00
properly highlight search keywords containing forward slash
This commit is contained in:
@@ -557,7 +557,9 @@ class Feeds extends Handler_Protected {
|
|||||||
|
|
||||||
if ($highlight_words && count($highlight_words) > 0) {
|
if ($highlight_words && count($highlight_words) > 0) {
|
||||||
foreach ($highlight_words as $word) {
|
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"]);
|
"<span class=\"highlight\">$1</span>", $line["title"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user