Build: Ensure HTML entities used are valid XHTML

Ref #639