I saw the last days, that it's possible with a simple PHP line to get a template XHTML strict valid.
I wondered, if that could be a solution for... Well, for everything.
What my idea is: All output is sent to -> HTML purifier -> then it's really in the output.
Sorry I'm no programmer, so I can't see if it's possible with this "tricks".
HTML purifier is available as FCKeditor module or just here: http://htmlpurifier.org/
Edit: I mean really "all output", regardless which module / template is working.