Use <mark> instead of <strong>
Also make it easier for a savvy user to use whatever HTML element they like for highlighting.
This commit is contained in:
parent
49ff8d6e4e
commit
f55f9e71b3
|
@ -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\',
|
||||
|
|
|
@ -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, '<strong>$1</strong>', $_RESULT->title_highlight);
|
||||
$_RESULT->url_highlight = preg_replace($pcre, '<strong>$1</strong>', $_RESULT->url_highlight);
|
||||
$_RESULT->matchtext_highlight = preg_replace($pcre, '<strong>$1</strong>', $_RESULT->matchtext_highlight);
|
||||
$_RESULT->description_highlight = preg_replace($pcre, '<strong>$1</strong>', $_RESULT->description_highlight);
|
||||
$_RESULT->title_highlight = preg_replace(
|
||||
$pcre,
|
||||
'<'.$_SDATA['tag'].'>$1</'.$_SDATA['tag'].'>',
|
||||
$_RESULT->title_highlight
|
||||
);
|
||||
$_RESULT->url_highlight = preg_replace(
|
||||
$pcre,
|
||||
'<'.$_SDATA['tag'].'>$1</'.$_SDATA['tag'].'>',
|
||||
$_RESULT->url_highlight
|
||||
);
|
||||
$_RESULT->matchtext_highlight = preg_replace(
|
||||
$pcre,
|
||||
'<'.$_SDATA['tag'].'>$1</'.$_SDATA['tag'].'>',
|
||||
$_RESULT->matchtext_highlight
|
||||
);
|
||||
$_RESULT->description_highlight = preg_replace(
|
||||
$pcre,
|
||||
'<'.$_SDATA['tag'].'>$1</'.$_SDATA['tag'].'>',
|
||||
$_RESULT->description_highlight
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue