From a0a148b1c3ba5ffd4ccd6ee52607629bc58875d0 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 9 Apr 2020 20:24:45 -0400 Subject: Render escaped mailto URL --- archive.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'archive.h') 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 -- cgit 1.4.1