commit 3d66541

default  ·  2022-11-20 04:53:40 +0000 UTC
parent e11fc49
Fixed RSS link.
1 files changed,  +4, -4
M html.c
M html.c
+4, -4
 1@@ -1132,14 +1132,14 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
 2             xs *title   = xs_dup(content);
 3             int i = -1;
 4 
 5-            /* escape tags */
 6-            content = xs_replace_i(content, "<", "&lt;");
 7-            content = xs_replace_i(content, ">", "&gt;");
 8-
 9             /* add the post link */
10             xs *l = xs_fmt("<p><a href=\"%s\">%s</a><p>", id, id);
11             content = xs_str_cat(content, l);
12 
13+            /* escape tags */
14+            content = xs_replace_i(content, "<", "&lt;");
15+            content = xs_replace_i(content, ">", "&gt;");
16+
17             if (strlen(title) > 40)
18                 title = xs_crop(title, 0, i = 40);
19