ENHANCEMENT: added check for missing opening html tag