about summary refs log tree commit diff
path: root/atom.c
diff options
context:
space:
mode:
Diffstat (limited to 'atom.c')
-rw-r--r--atom.c15
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) {