From 6b0d631a171192d4d9d5ccc6acabb307fee5fa22 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 16 Apr 2020 20:03:12 -0400 Subject: Decode quoted-printable and 7bit/8bit --- atom.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'atom.c') diff --git a/atom.c b/atom.c index 5f7e3c7..1c4d0de 100644 --- a/atom.c +++ b/atom.c @@ -85,12 +85,15 @@ int atomEntryOpen(FILE *file, const struct Envelope *envelope) { return error; } -int atomContentOpen(FILE *file) { - return templateRender(file, TEMPLATE(), NULL, NULL); -} - -int atomContentClose(FILE *file) { - return templateRender(file, TEMPLATE(), NULL, NULL); +int atomContent(FILE *file, const char *content) { + const char *template = TEMPLATE( + [content] + ); + struct Variable vars[] = { + { "content", content }, + {0}, + }; + return templateRender(file, template, vars, escapeXML); } int atomEntryClose(FILE *file) { -- cgit 1.4.1