I wouldn't have thought that strip_tags would strip bbcode, but you could try replacing it with htmlspecialchars() instead. Only problem with that is someone could probably insert on click events etc. into the bbcode tags and they wouldn't get removed, allowing users to run whatever javascript they wanted. Twitter had a lot of problems with this recently.