X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=blobdiff_plain;f=keyindex.h;fp=keyindex.h;h=961121e973d81d3b527745531eb4d3a22c796cc8;hp=c3e78efa17e617cec47299bd6cec57ca6718ad79;hb=79425efea806599b611de4e3b25bdc36516e7522;hpb=f67f09be8979050e73855b6551da83ca48dde950 diff --git a/keyindex.h b/keyindex.h index c3e78ef..961121e 100644 --- a/keyindex.h +++ b/keyindex.h @@ -49,10 +49,15 @@ int key_index(struct onak_dbctx *dbctx, int mrkey_index(struct openpgp_publickey *keys); /** - * txt2html - Takes a string and converts it to HTML. - * @string: The string to HTMLize. + * 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. + * Takes a string and escapes any HTML entities (<, >, &, ", '). Returns + * dst. */ -const char *txt2html(const char *string); +const char *html_escape(const char *src, size_t src_len, + char *dst, size_t dst_len); #endif