can MovableType tidy up after its users?

The W3C MarkUp Validation Service

Welcome to the W3C MarkUp Validation Service; a free service that checks documents like HTML and XHTML for conformance to W3C Recommendations and other standards.

It would be useful if MovableType could generate well-formed XHTML code, even to the point of correcting user-entered stuff. The core functions of htmltidy have been factored into a library, so I wonder how hard it would be to have the MT::CMS stuff pass new posts to it and store what came back?

MT does a fine job of writing conformant code: it’s the user edits that are the problem. For example, for years I have always tagged in upper case, for readability: XHTML is case-sensitive, so that breaks validation at the HEADhead tag.