summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-11-28 21:10:25 -0500
committerJune McEnroe <june@causal.agency>2020-11-28 21:46:28 -0500
commitd9e8a44f6f56393e4b08b4570115de77cf0d2a2f (patch)
tree16fdcf907fba001844e7eb7fa49db21856fff9c4 /html.c
parentRefactor IMAP struct (diff)
downloadbubger-d9e8a44f6f56393e4b08b4570115de77cf0d2a2f.tar.gz
bubger-d9e8a44f6f56393e4b08b4570115de77cf0d2a2f.zip
Replace templateBuffer with templateString
Diffstat (limited to '')
-rw-r--r--html.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/html.c b/html.c
index 6d9b6b2..d55e5bf 100644
--- a/html.c
+++ b/html.c
@@ -96,7 +96,7 @@ static char *htmlReply(const struct Envelope *envelope) {
 		{ ">", ">" },
 		{0},
 	};
-	return templateURL(template, vars);
+	return templateString(template, vars, escapeURL);
 }
 
 static char *htmlFragment(const char *messageID) {
@@ -104,7 +104,7 @@ static char *htmlFragment(const char *messageID) {
 		{ "messageID", messageID },
 		{0},
 	};
-	return templateURL("#[messageID]", vars);
+	return templateString("#[messageID]", vars, escapeURL);
 }
 
 static char *htmlMbox(const char *messageID) {
@@ -113,7 +113,7 @@ static char *htmlMbox(const char *messageID) {
 		{ "type", "mbox" },
 		{0},
 	};
-	return templateURL("../" PATH_MESSAGE, vars);
+	return templateString("../" PATH_MESSAGE, vars, escapeURL);
 }
 
 static int
@@ -353,7 +353,7 @@ int htmlAttachment(
 	const char *template = {
 		Q(<li><a href="[url]">[name][type][/][subtype]</a></li>)
 	};
-	char *url = templateURL("../" PATH_ATTACHMENT, path);
+	char *url = templateString("../" PATH_ATTACHMENT, path, escapeURL);
 	const char *name = paramGet(part->disposition.params, "filename");
 	if (!name) name = paramGet(part->params, "name");
 	struct Variable vars[] = {
@@ -383,7 +383,7 @@ static char *htmlThreadURL(const struct Envelope *envelope, const char *type) {
 		{ "type", type },
 		{0},
 	};
-	return templateURL("../" PATH_THREAD, vars);
+	return templateString("../" PATH_THREAD, vars, escapeURL);
 }
 
 int htmlThreadHead(FILE *file, const struct Envelope *envelope) {
@@ -553,7 +553,7 @@ static char *htmlIndexURL(const struct Envelope *envelope) {
 		{ "type", "html" },
 		{0},
 	};
-	return templateURL(PATH_THREAD, vars);
+	return templateString(PATH_THREAD, vars, escapeURL);
 }
 
 int htmlIndexThread(