Reporter: Ensure markup is valid XHTML

Fixes #639.