XmlEntities

FinanceGenius software emails developers an XML-formatted debugging string when an error is encountered. The problem was that certain email clients were treating XML tags as if they were HTML. The goal of this ticket was to properly render these entities using any email client.

I created a custom XmlEntities class to accomplish on XML what htmlentities does for HTML. My solution also includes a method that accepts a list of whitelisted HTML tags to let pass through unscathed, so that HTML-based emails can keep their pretty looks.