summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--format.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/format.c b/format.c
index 07a9b5d..42878a0 100644
--- a/format.c
+++ b/format.c
@@ -199,7 +199,8 @@ d_char *sanitize(const char *content)
199 xs *el = xs_regex_match(v, "(href|rel|class|target)=\"[^\"]*\""); 199 xs *el = xs_regex_match(v, "(href|rel|class|target)=\"[^\"]*\"");
200 xs *s3 = xs_join(el, " "); 200 xs *s3 = xs_join(el, " ");
201 201
202 s2 = xs_fmt("<%s%s %s>", v[1] == '/' ? "/" : "", tag, s3); 202 s2 = xs_fmt("<%s%s%s%s>",
203 v[1] == '/' ? "/" : "", tag, xs_list_len(s3) ? " " : "", s3);
203 } 204 }
204 else { 205 else {
205 /* bad tag: escape it */ 206 /* bad tag: escape it */