diff options
-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 b1e755cd3..86c926cf5 100644 --- a/inc/html.php +++ b/inc/html.php @@ -265,7 +265,8 @@ function html_draft(){ * @author Harry Fuecks <hfuecks@gmail.com> */ function html_hilight($html,$phrases){ - $regex = join('|',array_map('preg_quote_cb',array_filter((array) $phrases))); + $phrases = array_filter((array) $phrases); + $regex = join('|',array_map('preg_quote_cb',$phrases)); if ($regex === '') return $html; $html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html); |