right now, tidy is invoked when inserting wiki-formated messages too, by
OutputPage::addWikiText. This is not only redundant, but it also causes problems
when inserting short-messages inline: Tidy expects a block-element as the root,
it will insert <p> tags if no top-level block-element is present. This causes
such messages to be displayed in a new paragraph, like the file size/mime type
message in the example URL I provided. This is also the cause of bug #1337.
Applying tidy only once, to the full page, just before it is returned to the
client, would be much cleaner, avoid problems and save CPU cycles.