html.c: Allow empty strings on html_encode

This commit is contained in:
Xavier Del Campo Romero 2023-03-08 00:26:31 +01:00
parent 0954abcf09
commit ee75d8e3e5
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 6 additions and 0 deletions

6
html.c
View File

@ -24,6 +24,12 @@ static char *html_encode(const char *s)
dynstr_init(&d);
if (!*s && dynstr_append(&d, ""))
{
fprintf(stderr, "%s: dynstr_append empty failed\n", __func__);
goto failure;
}
while (*s)
{
static const struct esc