diff options
Diffstat (limited to '')
-rw-r--r-- | export.c | 18 |
1 files changed, 8 insertions, 10 deletions
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; } |