瀏覽代碼

Fixed RSS link.

default 3 年之前
父節點
當前提交
3d6654143e
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      html.c

+ 4 - 4
html.c

@@ -1132,14 +1132,14 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char *
             xs *title   = xs_dup(content);
             xs *title   = xs_dup(content);
             int i = -1;
             int i = -1;
 
 
-            /* escape tags */
-            content = xs_replace_i(content, "<", "&lt;");
-            content = xs_replace_i(content, ">", "&gt;");
-
             /* add the post link */
             /* add the post link */
             xs *l = xs_fmt("<p><a href=\"%s\">%s</a><p>", id, id);
             xs *l = xs_fmt("<p><a href=\"%s\">%s</a><p>", id, id);
             content = xs_str_cat(content, l);
             content = xs_str_cat(content, l);
 
 
+            /* escape tags */
+            content = xs_replace_i(content, "<", "&lt;");
+            content = xs_replace_i(content, ">", "&gt;");
+
             if (strlen(title) > 40)
             if (strlen(title) > 40)
                 title = xs_crop(title, 0, i = 40);
                 title = xs_crop(title, 0, i = 40);