BBCode parser in JS.