commit b5f63b6
default
·
2023-06-13 17:00:26 +0000 UTC
parent 5654960
In sanitize(), delete unsupported HTML tags instead of showing them.
1 files changed,
+2,
-6
M
format.c
M
format.c
+2,
-6
1@@ -224,13 +224,9 @@ xs_str *sanitize(const char *content)
2
3 s2 = xs_fmt("<%s%s%s%s>",
4 v[1] == '/' ? "/" : "", tag, xs_list_len(el) ? " " : "", s3);
5- }
6- else {
7- /* bad tag: escape it */
8- s2 = xs_replace(v, "<", "<");
9- }
10
11- s = xs_str_cat(s, s2);
12+ s = xs_str_cat(s, s2);
13+ }
14 }
15 else {
16 /* non-tag */