about summary refs log tree commit diff
path: root/archive.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-09 20:24:45 -0400
committerJune McEnroe <june@causal.agency>2020-04-09 20:24:45 -0400
commita0a148b1c3ba5ffd4ccd6ee52607629bc58875d0 (patch)
tree9c70d51767187802e71afb54dbad0a61675dd56c /archive.h
parentRender basic HTML envelopes with templating (diff)
downloadbubger-a0a148b1c3ba5ffd4ccd6ee52607629bc58875d0.tar.gz
bubger-a0a148b1c3ba5ffd4ccd6ee52607629bc58875d0.zip
Render escaped mailto URL
Diffstat (limited to 'archive.h')
-rw-r--r--archive.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/archive.h b/archive.h
index 8d96878..3d3cfc5 100644
--- a/archive.h
+++ b/archive.h
@@ -58,6 +58,7 @@ static inline void envelopeFree(struct Envelope envelope) {
 }
 
 #define TEMPLATE(...) #__VA_ARGS__
+#define ESCAPE_URL_CAP(len) (3 * (len))
 
 struct Variable {
 	const char *name;
@@ -66,6 +67,9 @@ struct Variable {
 
 typedef int EscapeFn(FILE *file, const char *str);
 
+int escapeURL(FILE *file, const char *str);
+int escapeXML(FILE *file, const char *str);
+
 int templateRender(
 	FILE *file, const char *template,
 	const struct Variable *vars, EscapeFn *escape