Skip to content
Snippets Groups Projects
Commit a0fed8ac authored by Andreas Gohr's avatar Andreas Gohr
Browse files

more robust replacement for last highlight regexp fix

darcs-hash:20080309174810-7ad00-16f8bee9e9ce13f6255e59de42685e49b3854bac.gz
parent 838fc1b3
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment