X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keyindex.h;h=961121e973d81d3b527745531eb4d3a22c796cc8;hb=refs%2Fheads%2Fmain;hp=4b10e4517c755ddaab20ab0c6c1eb0d0a5f67ea1;hpb=6df51fef2960f533a741fb7290867387ed3fbba5;p=onak.git diff --git a/keyindex.h b/keyindex.h index 4b10e45..961121e 100644 --- a/keyindex.h +++ b/keyindex.h @@ -47,4 +47,17 @@ int key_index(struct onak_dbctx *dbctx, * machine readable list of them. */ int mrkey_index(struct openpgp_publickey *keys); + +/** + * html_escape - Takes a string and converts it to HTML. + * @src: The string to HTMLize. + * @src_len: The length of the source string + * @dst: A buffer to put the escaped string into + * @dst_len: Length of the destination buffer (including a trailing NULL) + * + * Takes a string and escapes any HTML entities (<, >, &, ", '). Returns + * dst. + */ +const char *html_escape(const char *src, size_t src_len, + char *dst, size_t dst_len); #endif