Fix badly nested HTML