summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/html.c b/html.c
index 2d8e1fd..e6ef263 100644
--- a/html.c
+++ b/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);
int i = -1;
- /* escape tags */
- content = xs_replace_i(content, "<", "&lt;");
- content = xs_replace_i(content, ">", "&gt;");
-
/* add the post link */
xs *l = xs_fmt("<p><a href=\"%s\">%s</a><p>", id, id);
content = xs_str_cat(content, l);
+ /* escape tags */
+ content = xs_replace_i(content, "<", "&lt;");
+ content = xs_replace_i(content, ">", "&gt;");
+
if (strlen(title) > 40)
title = xs_crop(title, 0, i = 40);