properly highlight search keywords containing forward slash
This commit is contained in:
parent
f559d74a4e
commit
0f05147531
1 changed files with 3 additions and 1 deletions
|
@ -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"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue