equal
deleted
inserted
replaced
394 } |
394 } |
395 |
395 |
396 $regex = '/(' . implode('|', $words2) . ')/i'; |
396 $regex = '/(' . implode('|', $words2) . ')/i'; |
397 $pt = preg_replace($regex, '<span class="search-term">\\1</span>', $pt); |
397 $pt = preg_replace($regex, '<span class="search-term">\\1</span>', $pt); |
398 |
398 |
399 $title = preg_replace($regex, '<span class="title-search-term">\\1</span>', $paths->pages[$page]['name']); |
399 $title = preg_replace($regex, '<span class="title-search-term">\\1</span>', htmlspecialchars($paths->pages[$page]['name'])); |
400 |
400 |
401 $cut_off = false; |
401 $cut_off = false; |
402 |
402 |
403 foreach ( $words as $word ) |
403 foreach ( $words as $word ) |
404 { |
404 { |