refresh Refresh Posts • Page: 1  
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 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 in the Bug Reports section.

------------------


Go Osimo! | Xbox Live Gamertag: MeltingIce117

I've made some updates to the BBcode parser since this last post.

  • In URL's, the parser now only accepts the protocols you want available i.e. http or ftp
  • Quoting is now supported and it also allows you to specify the original poster name like you can see below. A standard function will be made shortly to allow theme developers to easily incorporate post quoting by clicking a button.
  • A couple of bug fixes (because I can never remember everything I've fixed)


Here's the quote tag in action:

Quote: original post by meltingice
Hey guys, I'm in a blockquote!


Cool eh?

------------------


Go Osimo! | Xbox Live Gamertag: MeltingIce117

Just finished working on the BBCode help/reference. Now, clicking the BBCode Help button underneath the reply area for a thread opens up a modal window that has examples of every BBCode currently in use by Osimo.

What's nice is that you can leave the window open while you type a reply to a thread, move it around, and resize it to fit your screen. If you are logged in, give it a shot below!

------------------


Go Osimo! | Xbox Live Gamertag: MeltingIce117