mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
More sanitize tweaks.
This commit is contained in:
parent
789aec5d7f
commit
206dd52275
1 changed files with 2 additions and 1 deletions
3
format.c
3
format.c
|
@ -199,7 +199,8 @@ d_char *sanitize(const char *content)
|
||||||
xs *el = xs_regex_match(v, "(href|rel|class|target)=\"[^\"]*\"");
|
xs *el = xs_regex_match(v, "(href|rel|class|target)=\"[^\"]*\"");
|
||||||
xs *s3 = xs_join(el, " ");
|
xs *s3 = xs_join(el, " ");
|
||||||
|
|
||||||
s2 = xs_fmt("<%s%s %s>", v[1] == '/' ? "/" : "", tag, s3);
|
s2 = xs_fmt("<%s%s%s%s>",
|
||||||
|
v[1] == '/' ? "/" : "", tag, xs_list_len(s3) ? " " : "", s3);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* bad tag: escape it */
|
/* bad tag: escape it */
|
||||||
|
|
Loading…
Reference in a new issue