note the source of highlighting routine

This commit is contained in:
Andrew Dolgov 2013-07-31 14:54:22 +04:00
parent dd90eb2c7a
commit d41ad03712
1 changed files with 2 additions and 0 deletions

View File

@ -2865,6 +2865,8 @@
if ($highlight_words) { if ($highlight_words) {
foreach ($highlight_words as $word) { foreach ($highlight_words as $word) {
// http://stackoverflow.com/questions/4081372/highlight-keywords-in-a-paragraph
$elements = $xpath->query('//*[contains(.,"'.$word.'")]'); $elements = $xpath->query('//*[contains(.,"'.$word.'")]');
foreach ($elements as $element) { foreach ($elements as $element) {