Updated escapeHTML to support BBcode