Avoid too deep nesting of html_entry().

This commit is contained in:
default 2023-07-18 09:59:16 +02:00
parent 6e5c7d4a4b
commit 2700567fca

4
html.c
View file

@ -836,6 +836,10 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
if (is_hidden(snac, id))
return os;
/* avoid too deep nesting, as it may be a loop */
if (level >= 256)
return os;
xs *s = xs_str_new("<div>\n");
{