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

View file

@ -561,6 +561,13 @@ class Feeds extends Handler_Protected {
$reply['content'] .= "</div>"; $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\" $reply['content'] .= "<span id=\"RTITLE-$id\"
onclick=\"return cdmClicked(event, $id);\" onclick=\"return cdmClicked(event, $id);\"
class=\"titleWrap $hlc_suffix\"> class=\"titleWrap $hlc_suffix\">