Making bad HTML less bad