before fixing tags by using external html tidy