about summary refs log tree commit diff
path: root/atom.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-13 15:04:09 -0400
committerJune McEnroe <june@causal.agency>2020-04-13 15:04:09 -0400
commit62f17889aed9a0488173d16f28adcefa41daa204 (patch)
treeb3dad9b30b8244891d6b6d8eeb55c61e114a2d30 /atom.c
parentExport content to Atom (diff)
downloadbubger-62f17889aed9a0488173d16f28adcefa41daa204.tar.gz
bubger-62f17889aed9a0488173d16f28adcefa41daa204.zip
Use <content type="text"> in Atom
The <content type="html"><pre> thing would require the text to be
escaped twice...
Diffstat (limited to 'atom.c')
-rw-r--r--atom.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/atom.c b/atom.c
index 80639a3..d3463ce 100644
--- a/atom.c
+++ b/atom.c
@@ -72,27 +72,11 @@ int atomEntryOpen(FILE *file, const struct Envelope *envelope) {
 }
 
 int atomContentOpen(FILE *file) {
-	const char *template = TEMPLATE(
-		<content type="html">
-		[<pre>]
-	);
-	struct Variable vars[] = {
-		{ "<pre>", "<pre>" },
-		{0},
-	};
-	return templateRender(file, template, vars, escapeXML);
+	return templateRender(file, TEMPLATE(<content type="text">), NULL, NULL);
 }
 
 int atomContentClose(FILE *file) {
-	const char *template = TEMPLATE(
-		[</pre>]
-		</content>
-	);
-	struct Variable vars[] = {
-		{ "</pre>", "</pre>" },
-		{0},
-	};
-	return templateRender(file, template, vars, escapeXML);
+	return templateRender(file, TEMPLATE(</content>), NULL, NULL);
 }
 
 int atomEntryClose(FILE *file) {