snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit b5f63b63fac94a7cfa91ad8149f9669a56150378
parent 5654960161a295f56c56b66f822fbb245800e4bf
Author: default <nobody@localhost>
Date:   Tue, 13 Jun 2023 19:00:26 +0200

In sanitize(), delete unsupported HTML tags instead of showing them.

Diffstat:
Mformat.c | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/format.c b/format.c @@ -224,13 +224,9 @@ xs_str *sanitize(const char *content) s2 = xs_fmt("<%s%s%s%s>", v[1] == '/' ? "/" : "", tag, xs_list_len(el) ? " " : "", s3); - } - else { - /* bad tag: escape it */ - s2 = xs_replace(v, "<", "&lt;"); - } - s = xs_str_cat(s, s2); + s = xs_str_cat(s, s2); + } } else { /* non-tag */