commit 5882ed1
default
·
2022-11-20 04:33:42 +0000 UTC
parent 86aa0ff
More RSS tweaks.
1 files changed,
+3,
-3
M
html.c
M
html.c
+3,
-3
1@@ -1137,13 +1137,13 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
2 content = xs_replace_i(content, ">", ">");
3
4 if (strlen(title) > 40)
5- title[i = 40] = '\0';
6+ title = xs_crop(title, 0, i = 40);
7
8 if ((v = strchr(title, '<')))
9- title[i = (v - title)] = '\0';
10+ title = xs_crop(title, 0, i = (v - title));
11
12 if ((v = strchr(title, '&')))
13- title[i = (v - title)] = '\0';
14+ title = xs_crop(title, 0, i = (v - title));
15
16 if (i != -1)
17 title = xs_str_cat(xs_strip(title), "...");