gpgme-tool: escape special characters in output XML data (<, >, and &).
[[PGP Signed Part:Undecided]]
src/gpgme-tool.c (result_xml_escape_replacement, result_xml_escape):
New.
(result_xml_tag_data): Use result_xml_escape() to escape data.
(result_add_error): Use unescaped < and >.
--
This is a general solution for generating valid XML, but the specific
output that inspired the change was from the KEYLIST command:
<uid>William Trevor King <wking@tremily.us></uid>
Now the uids are properly escaped:
<uid>William Trevor King <wking@tremily.us></uid>
Signed-off-by: W. Trevor King <wking@tremily.us>