Improve detection of html with singleton tags