Up until now, Osimo used a 3rd party BBCode parser, mainly because I wanted to save time during the development process. Well, tonight when I launched the Osimo community forums, I discovered that the old BBCode parser was very insecure. It actually let you run Javascript through BBCode, which leaves pages wide open for exploitation. It was also very bulky, so I decided, as I have many times in the past, screw it… I’ll just make my own BBCode parser.
The Osimo BBCode parser is written in PHP and supports all the most common BBCode tags and also supports nesting. It uses zero regular expressions too, so it is super fast (average execution time of about half a millisecond). Because of the way it is written, the parser will work on any site that needs BBCode parsing since all you need to do to use it is $content = bb2html($bbstring);
If you would like to see the code for it, you can view it (and get it for your own use) here. If you find any bugs with it, please post them here on the community forums.

Leave a Reply