plugins/SpecialSearch.php
changeset 90 9d29f7e101d6
parent 85 7c68a18a27be
child 100 e9a685fb456f
equal deleted inserted replaced
89:fea81844b9a5 90:9d29f7e101d6
   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   {