diff options
Diffstat (limited to 'inc/html.php')
-rw-r--r-- | inc/html.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php index 080beb01a..fcfa54b6c 100644 --- a/inc/html.php +++ b/inc/html.php @@ -284,7 +284,8 @@ function html_hilight($html,$phrases){ $regex = join('|',array_map('ft_snippet_re_preprocess', array_map('preg_quote_cb',$phrases))); if ($regex === '') return $html; - $html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); + if (!utf8_check($regex)) return $html; + $html = @preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); return $html; } |