Parse html to rewrite