support term highlighting in cdm title

This commit is contained in:
Andrew Dolgov 2013-07-31 16:41:06 +04:00
parent 3684074387
commit 34dad84414
1 changed files with 7 additions and 0 deletions

View File

@ -561,6 +561,13 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</div>";
if ($highlight_words && count($highlight_words > 0)) {
foreach ($highlight_words as $word) {
$line["title"] = preg_replace("/(\Q$word\E)/i",
"<span class=\"highlight\">$1</span>", $line["title"]);
}
}
$reply['content'] .= "<span id=\"RTITLE-$id\"
onclick=\"return cdmClicked(event, $id);\"
class=\"titleWrap $hlc_suffix\">