making the XML entity escaping much more efficient