MyBB Community Forums

Full Version: Search Highlight destroys preg_replace
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I'm designing a plugin which I use preg_replace in it. For Example:

	$message =preg_replace('#\[plugintag\](.*?)\[/plugintag\]#s',"<div align=\"center\">{$text}</div>", $message);	
This works perfectly, but when a search highlight is given in showthread.php and the highlight word is like a word (or is like the tags) between the plugin tags (or is like the tags), it will be highlighted and the tags will be destroyed and won't functioning!(Like the attached image)
[attachment=27377]
One thread is enough (plus, wrong section).
http://community.mybb.com/thread-127137.html