I installed the "Tooltip Glossary" wordpress plugin on the Wordpress site, but after a little records that contains HTML tags were joined, it essentially eliminate. I've removed tags of all the problem reference records, but am now getting these error messages on every page:

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'b' in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wordpress-content/plug ins/tooltipglossary/reference.php online 90

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'b' in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wordpress-content/plug ins/tooltipglossary/reference.php online 101

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'd' in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wordpress-content/plug ins/tooltipglossary/reference.php online 90

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'd' in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wordpress-content/plug ins/tooltipglossary/reference.php online 101

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'l' in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wordpress-content/plug ins/tooltipglossary/reference.php online 90

Warning: preg_replace() [function.preg-replace]: Unknown modifier 'l' in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wordpress-content/plug ins/tooltipglossary/reference.php online 101

Can someone assist me to determine wrong? I have submitted the php apply for the wordpress plugin here: http://www.box.net/shared/1nonkcm9yq

Particularly, line 90 is

$content_temp = preg_replace($reference_search, $reference_replace, $content)

and line 101 is

$content_temp = preg_replace($link_search, $link_replace, $content_temp)

Thanks a lot!

You've got a forward slash inside your title. It's smashing the regular expression, because / can also be the outer delimiter.

You have to add preg_quote() where $reference_search is built (line 83):

$glossary_title = $glossary_item->post_title;
$glossary_title = preg_quote($glossary_title, "/");
$glossary_search = '/\b'.$glossary_title.'s*?\b(?=([^"]*"[^"]*")*[^"]*$)/i';

As well as line 94:

$link_search = '/<a'.$timestamp.'>('.preg_quote($glossary_item->post_title, "/").'[A-Za-z]*?)<\/a'.$timestamp.'>/i';