updated to reject bad HTML and notify