Module/Method to cleanup content of Drupal site?
Normally, when I have encountered this, there is too much variety to do much automated cleanup.  You can do something like this, though

$sql = "
  SELECT n.nid
  FROM {node} n
";

$result = db_query($sql);

while ($row = db_fetch_object($result)) {
  $node = node_load($row-&gt;nid, NULL, TRUE); // bypass internal cache
  $node-&gt;body = _filter_htmlcorrector($node-&gt;body);
  node_save($node);
}


Either stick this in a custom menu entry or make a simple script for it.  Depending on how many nodes you have, you may need to use the Batch API.

_filter_htmlcorrector will fix bad HTML to an extent, and I have also used check_markup with luck, too.  For check_markup, you just need to figure out the numeric filter number to use.

Other than that, you really do need to play with the processing you do in the loop.  This will give yourself a head start, but you still need to edit each article and manually check/fix things.