summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/html.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index b2b76f2c7..a0ae0110d 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -265,7 +265,7 @@ function html_draft(){
function html_hilight($html,$regex){
// strip everything that's special except pipes:
$regex = preg_replace('![\[\]()/\\\\?\.+*]+!','',$regex);
- $regex = trim($regex,' |');
+ $regex = join('|',array_filter(array_map('trim',explode('|',$regex))));
if ($regex === '') return $html;
$html = preg_replace_callback("/((<[^>]*)|$regex)/ui",'html_hilight_callback',$html);