While most of the generated fossil output is valid xhtml, there are still several places that aren't.

These include not using &amp; instead of a plain & when generating URLs in href attributes, using &lt;br> and &lt;hr> instead of &lt;br /> and &lt;hr />, using &amp;nbsp; instead of &amp;#160; and finally the occasional &lt;img> instead of &lt;img />.

The attached patch corrects these issues so that fossil can return valid application/xhtml+xml content.