Handle invalid XML 1.0 characters (see also pull request #38)