If you have Tidy installed, just pipe your buffer through it to get clean HTML.
:%!tidy -qicbn -asxhtml
Use "tidy -h" for more help on the options, but the ones I tend to go with are in the example above:
-indent, -i indent element content -clean, -c replace FONT, NOBR and CENTER tags by CSS -bare, -b strip out smart quotes and em dashes, etc. -numeric, -n output numeric rather than named entities -quiet, -q suppress nonessential output -asxml, -asxhtml convert HTML to well formed XHTML