OK ... this will be redundant for those of you getting e-mail alerts, but I've incorporated Bruno's HTML fixes into the CVS tree.
Also Scott, others have tackled bad HTML in other isolated cases where they've found it. Feel free to submit bug reports and patches for code that emits sloppy or broken HTML.