diff options
author | June McEnroe <june@causal.agency> | 2020-04-16 20:03:12 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-16 20:03:12 -0400 |
commit | 6b0d631a171192d4d9d5ccc6acabb307fee5fa22 (patch) | |
tree | 1d406ef9428199bdd56c7a5dcd26bb0d90cd9fab /atom.c | |
parent | Decode Q encoding (diff) | |
download | bubger-6b0d631a171192d4d9d5ccc6acabb307fee5fa22.tar.gz bubger-6b0d631a171192d4d9d5ccc6acabb307fee5fa22.zip |
Decode quoted-printable and 7bit/8bit
Diffstat (limited to '')
-rw-r--r-- | atom.c | 15 |
1 files changed, 9 insertions, 6 deletions
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(<content type="text">), NULL, NULL); -} - -int atomContentClose(FILE *file) { - return templateRender(file, TEMPLATE(</content>), NULL, NULL); +int atomContent(FILE *file, const char *content) { + const char *template = TEMPLATE( + <content type="text">[content]</content> + ); + struct Variable vars[] = { + { "content", content }, + {0}, + }; + return templateRender(file, template, vars, escapeXML); } int atomEntryClose(FILE *file) { |