View Full Version : Allow BBCode but Not HTML
09-18-2009, 03:54 AM
OK, so I got a problem. I want my users to be able to post BBCode in their message but NOT html.
How do I do this?
I can't use htmlentities because then they can't use things like quotes or emotions.
09-18-2009, 05:08 AM
For something simple use strip_tags() function.
$clean = strip_tags($_POST['comment']);
09-18-2009, 11:06 AM
PEAR has the BBCode Parser (http://pear.php.net/package/HTML_BBCodeParser/download) ... At least it could be worth looking at it I think.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.