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 --- export.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'export.c') diff --git a/export.c b/export.c index 1e07acd..ed594de 100644 --- a/export.c +++ b/export.c @@ -99,12 +99,10 @@ static void exportAtom( } } if (bodyPartType(part, "text", "plain")) { - const char *content = dataCheck(body, String).string; - error = 0 - || atomContentOpen(file) - || decodeContent(file, escapeXML, structure, content) - || atomContentClose(file); + char *content = decodeToString(part, dataCheck(body, String).string); + error = atomContent(file, content); if (error) err(EX_IOERR, "%s", path); + free(content); } error = atomEntryClose(file) || fclose(file); @@ -135,11 +133,11 @@ static int exportHTMLBody( || htmlMessageClose(file); } else if (bodyPartType(structure, "text", "plain")) { // TODO: Check if not inline. - const char *content = dataCheck(body, String).string; - error = 0 - || htmlInlineOpen(file, structure) - || decodeContent(file, escapeXML, structure, content) - || htmlInlineClose(file); + char *content = decodeToString( + structure, dataCheck(body, String).string + ); + error = htmlInline(file, structure, content); + free(content); } return error; } -- cgit 1.4.1