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