diff --git a/orcinus/config.php b/orcinus/config.php index 8b27eb0..cc61bf1 100644 --- a/orcinus/config.php +++ b/orcinus/config.php @@ -155,7 +155,7 @@ if (!count($testConf->fetchAll())) { `sp_sleep`=0, `sp_ignore_ext`=\'7z au aiff avi bin bz bz2 cab cda cdr class com css csv doc docx dll dtd dwg dxf eps exe gif hqx ico image jar jav java jfif jpeg jpg js kbd mid mkv moov mov movie mp3 mp4 mpeg mpg ocx ogg png pps ppt ps psd qt ra ram rar rm rpm rtf scr sea sit svg swf sys tar.gz tga tgz tif tiff ttf uu uue vob wav woff woff2 xls xlsx z zip\', `sp_ignore_url`=\'\', - `sp_ignore_css`=\'.noindex footer form head nav noscript select style svg textarea\', + `sp_ignore_css`=\'.noindex footer form head nav noscript select script style svg textarea\', `sp_require_url`=\'\', `sp_title_strip`=\'\', `sp_category_default`=\'Main\', diff --git a/orcinus/search.php b/orcinus/search.php index ff8b98b..0fd7ab6 100644 --- a/orcinus/search.php +++ b/orcinus/search.php @@ -14,6 +14,7 @@ $_SDATA = array( 'raw' => '' ), 'results' => array(), + 'tag' => 'mark', 'json' => array(), 'pages' => 1, 'time' => microtime(true) @@ -654,10 +655,26 @@ if ($_RDATA['s_searchable_pages']) { case 'phrase': case 'term': - $_RESULT->title_highlight = preg_replace($pcre, '$1', $_RESULT->title_highlight); - $_RESULT->url_highlight = preg_replace($pcre, '$1', $_RESULT->url_highlight); - $_RESULT->matchtext_highlight = preg_replace($pcre, '$1', $_RESULT->matchtext_highlight); - $_RESULT->description_highlight = preg_replace($pcre, '$1', $_RESULT->description_highlight); + $_RESULT->title_highlight = preg_replace( + $pcre, + '<'.$_SDATA['tag'].'>$1', + $_RESULT->title_highlight + ); + $_RESULT->url_highlight = preg_replace( + $pcre, + '<'.$_SDATA['tag'].'>$1', + $_RESULT->url_highlight + ); + $_RESULT->matchtext_highlight = preg_replace( + $pcre, + '<'.$_SDATA['tag'].'>$1', + $_RESULT->matchtext_highlight + ); + $_RESULT->description_highlight = preg_replace( + $pcre, + '<'.$_SDATA['tag'].'>$1', + $_RESULT->description_highlight + ); } }