Replace characers which aren't allowed in XML 1.0.