diff options
| author | 2022-11-16 17:46:55 +0100 | |
|---|---|---|
| committer | 2022-11-16 17:46:55 +0100 | |
| commit | 206dd52275163e197cfa400aa784f7bcf312e9fc (patch) | |
| tree | 853c29f9fdf3d47528f42adf37d7a761e9b314c0 | |
| parent | Drop incoming messages that has their parent hidden. (diff) | |
| download | snac2-206dd52275163e197cfa400aa784f7bcf312e9fc.tar.gz snac2-206dd52275163e197cfa400aa784f7bcf312e9fc.tar.xz snac2-206dd52275163e197cfa400aa784f7bcf312e9fc.zip | |
More sanitize tweaks.
| -rw-r--r-- | format.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -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 */ |