Fixed various Javascript bbcode bugs