handle invalid html