I installed the “Tooltip Glossary” plugin on a WordPress site, but after some entries containing HTML tags were entered, it basically stopped working. I have stripped tags out of all the offending glossary entries, 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/wp-content/plugins/tooltipglossary/glossary.php on line 90
Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘b’ in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wp-content/plugins/tooltipglossary/glossary.php on line 101
Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘d’ in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wp-content/plugins/tooltipglossary/glossary.php on line 90
Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘d’ in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wp-content/plugins/tooltipglossary/glossary.php on line 101
Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘l’ in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wp-content/plugins/tooltipglossary/glossary.php on line 90
Warning: preg_replace() [function.preg-replace]: Unknown modifier ‘l’ in /afs/ir.stanford.edu/group/hopes/cgi-bin/wordpress/wp-content/plugins/tooltipglossary/glossary.php on line 101
Can someone help me figure out what’s wrong? I’ve uploaded the php file for the plugin here: http://www.box.net/shared/1nonkcm9yq
Specifically, line 90 is
$content_temp = preg_replace($glossary_search, $glossary_replace, $content);
and line 101 is
$content_temp = preg_replace($link_search, $link_replace, $content_temp);
Thanks so much!
You have a forward slash in your title. It’s breaking the regular expression, because / is also the outer delimiter.
You need to add preg_quote() where $glossary_search is constructed (line 83):
And also line 94: