delete whitespace and validate html