handle img without an endtag correctly