aboutsummaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-11-16 13:13:31 +0100
committerdefault <nobody@localhost>2022-11-16 13:13:31 +0100
commit236ca9af6b66cfc0c20c4fd5a2b5c8c187bfe3f4 (patch)
treec808cdec072ca3dc8af8ac65df44ff35bc5f52b2 /html.c
parent45584746d0f2c5fbfe1f5a6e0572d8ddd4f4f582 (diff)
Call sanitize() as soon as possible.
Diffstat (limited to 'html.c')
-rw-r--r--html.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/html.c b/html.c
index 863de75..7d59592 100644
--- a/html.c
+++ b/html.c
@@ -627,7 +627,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i
}
{
- xs *c = xs_dup(xs_dict_get(msg, "content"));
+ xs *c = sanitize(xs_dict_get(msg, "content"));
char *p, *v;
/* do some tweaks to the content */
@@ -663,9 +663,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, xs_set *seen, int local, i
}
}
- xs *sc = sanitize(c);
-
- s = xs_str_cat(s, sc);
+ s = xs_str_cat(s, c);
}
s = xs_str_cat(s, "\n");