bug 5301: improve escaping of XML characters in bib output