Implement fixing html to create well formed markup