Sanitize HTML using a DOM parser