summaryrefslogtreecommitdiff
path: root/format.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-06-13 19:00:26 +0200
committerdefault <nobody@localhost>2023-06-13 19:00:26 +0200
commitb5f63b63fac94a7cfa91ad8149f9669a56150378 (patch)
tree9f14b49b42539f10bf018dad0642bc34e21551e6 /format.c
parent5654960161a295f56c56b66f822fbb245800e4bf (diff)
In sanitize(), delete unsupported HTML tags instead of showing them.
Diffstat (limited to 'format.c')
-rw-r--r--format.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/format.c b/format.c
index f8adae0..482edce 100644
--- 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 */