mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 06:40:12 +01:00
fixed a html encode problem
This commit is contained in:
parent
9431f19fd9
commit
d0ef91ea72
@ -371,11 +371,15 @@ class ModelSearchMessage extends Model {
|
||||
|
||||
|
||||
private function highlight_search_terms($s = '', $terms = array()) {
|
||||
$terms = preg_replace("/(\'|\")/", "", $terms);
|
||||
|
||||
$terms = explode(" ", $terms);
|
||||
|
||||
if(count($terms) <= 0) { return $s; }
|
||||
|
||||
while(list($k, $v) = each($terms)) {
|
||||
if($v == '') { continue; }
|
||||
|
||||
$s = preg_replace("/$v/i", "<span class=\"message_highlight\">$v</span>", $s);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user