HTML Entity Checker: The Devil in the Details
HTML entities are invisible until they're wrong. An unencoded ampersand in an XML document can crash an entire parser. This tool finds every one.
HTML and XML have a small set of characters that must be escaped when they appear in content: <, >, &, ", '. These characters have special meaning in markup languages. When they appear unescaped in content, they confuse parsers and can break entire documents.
The entity checker finds every instance of these characters — both unescaped ones that should be entities, and malformed entities that are trying to be encoded but have syntax errors (like & missing the semicolon, or &nbps; with a typo).
It also checks for entities that don't exist in the target format. HTML has hundreds of named entities (—, ©, etc.) that are perfectly valid in HTML but invalid in XML, which only recognizes five named entities. Documents converted from HTML to XML frequently carry these invalid entities and then fail to parse.
I learned about this problem the hard way: a document conversion pipeline I was running produced thousands of files, and approximately 8% of them had entity errors from the source HTML. We discovered this after delivery. The entity checker now runs as a pre-delivery check on everything I produce.