Skip to content

Commit

Permalink
Fixed Asian search term handling in ft_snippet_re_preprocess()
Browse files Browse the repository at this point in the history
  • Loading branch information
kazmiya authored and splitbrain committed Dec 13, 2010
1 parent ec5906e commit 3559461
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inc/fulltext.php
Expand Up @@ -396,6 +396,11 @@ function ft_snippet($id,$highlight){
* Wraps a search term in regex boundary checks.
*/
function ft_snippet_re_preprocess($term) {
// do not process asian terms where word boundaries are not explicit
if(preg_match('/'.IDX_ASIAN.'/u',$term)){
return $term;
}

if(substr($term,0,2) == '\\*'){
$term = substr($term,2);
}else{
Expand Down

0 comments on commit 3559461

Please sign in to comment.