diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-03-09 18:48:10 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-03-09 18:48:10 +0100 |
commit | a0fed8ac0087b2df2ae74f037b7ffd679f86174e (patch) | |
tree | d4d35205741033e8e9da8cbc34f810a4e44d73f1 /inc/html.php | |
parent | 838fc1b345833427b6e92980675c04efe5969257 (diff) | |
download | rpg-a0fed8ac0087b2df2ae74f037b7ffd679f86174e.tar.gz rpg-a0fed8ac0087b2df2ae74f037b7ffd679f86174e.tar.bz2 |
more robust replacement for last highlight regexp fix
darcs-hash:20080309174810-7ad00-16f8bee9e9ce13f6255e59de42685e49b3854bac.gz
Diffstat (limited to 'inc/html.php')
-rw-r--r-- | inc/html.php | 2 |
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); |