commit 206dd52

default  ·  2022-11-16 16:46:55 +0000 UTC
parent 789aec5
More sanitize tweaks.
1 files changed,  +2, -1
+2, -1
 1@@ -199,7 +199,8 @@ d_char *sanitize(const char *content)
 2                 xs *el = xs_regex_match(v, "(href|rel|class|target)=\"[^\"]*\"");
 3                 xs *s3 = xs_join(el, " ");
 4 
 5-                s2 = xs_fmt("<%s%s %s>", v[1] == '/' ? "/" : "", tag, s3);
 6+                s2 = xs_fmt("<%s%s%s%s>",
 7+                    v[1] == '/' ? "/" : "", tag, xs_list_len(s3) ? " " : "", s3);
 8             }
 9             else {
10                 /* bad tag: escape it */