| 1757 | | if (!preg_match('/<.+>/',$text)) { |
|---|
| 1758 | | $text = preg_replace('/(\b'.$term.'\b)/i','<span class="hilite">$1</span>',$text); |
|---|
| 1759 | | } else { |
|---|
| 1760 | | $text = preg_replace('/(?<=>)([^<]+)?(\b'.$term.'\b)/i','$1<span class="hilite">$2</span>',$text); |
|---|
| | 1757 | if (!empty($term) && $term != ' ') { |
|---|
| | 1758 | if (!preg_match('/<.+>/',$text)) { |
|---|
| | 1759 | $text = preg_replace('/(\b'.$term.'\b)/i','<span class="hilite">$1</span>',$text); |
|---|
| | 1760 | } else { |
|---|
| | 1761 | $text = preg_replace('/(?<=>)([^<]+)?(\b'.$term.'\b)/i','$1<span class="hilite">$2</span>',$text); |
|---|
| | 1762 | } |
|---|