Xml encoding fix

Second attempt at pull request. Descriptions for defects had invalid XML characters in some situations.  I borrowed code from .NET snippets (https://github.com/mkropat/.NET-Snippets/blob/master/XmlTextEncoder.cs) for the fix.  I have now included a license that Michael Kropat added upon my request.  I have also added a unit test that shows how his encoder will succeed with a problem string.