Improved unescaping of XML

Added escaping of \n and apostrophe which LibreOffice at least generates.