better javascript BBcode helper