Home GnuPG
Diffusion GPGME 3f1329e1c9b9

gpgme-tool: escape special characters in output XML data (<, >, and &).
3f1329e1c9b9Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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 &lt;wking@tremily.us&gt;</uid>
  • Signed-off-by: W. Trevor King <wking@tremily.us>

Details

Provenance
W. Trevor King <wking@tremily.us>Authored on Oct 6 2012, 5:30 PM
wernerCommitted on Oct 11 2012, 4:22 PM
Parents
rMc28ebca9f2e2: gpgme-tool: Fix chain_id -> chain-id in KEYLIST XML.
Branches
Unknown
Tags
Unknown

Event Timeline