Page 1 of 1

implementing bbcode

Posted: Fri Mar 28, 2008 3:40 pm
by ZxSpectrum
hello, in my site i have a kind of internal priorietary forums, and users are asking for bbcodes.
I searched in internet though, and i saw that if the input is not properly sanitized, there are several security risks.

Anyone knows about a PHP libs for bbcode that is safe and is properly mantained?

Thanks

Re: implementing bbcode

Posted: Sun Mar 30, 2008 3:14 pm
by Ambush Commander
If your users don't mind writing HTML, I'd recommend my library HTML Purifier to you. Otherwise, you can check out PEAR.

Re: implementing bbcode

Posted: Mon Mar 31, 2008 5:26 am
by ZxSpectrum
Uhm interesting, then i Think i can run this html purifier after the BBCODE function has expanded BBCODEs into Html...

Re: implementing bbcode

Posted: Mon Mar 31, 2008 10:16 am
by samb0057
I attached a BBcode function I wrote, along with the help page for your users.