diff options
| author | 2022-11-20 05:51:54 +0100 | |
|---|---|---|
| committer | 2022-11-20 05:51:54 +0100 | |
| commit | e11fc49fd7c8764c0cc6fa651a1d7ef3d70ab90f (patch) | |
| tree | 24c1728b06320f5cc98a49fb6e741daabaa72964 /html.c | |
| parent | More RSS tweaks. (diff) | |
| download | snac2-e11fc49fd7c8764c0cc6fa651a1d7ef3d70ab90f.tar.gz snac2-e11fc49fd7c8764c0cc6fa651a1d7ef3d70ab90f.tar.xz snac2-e11fc49fd7c8764c0cc6fa651a1d7ef3d70ab90f.zip | |
Add a link to the post in each RSS entry.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -1136,6 +1136,10 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char * | |||
| 1136 | content = xs_replace_i(content, "<", "<"); | 1136 | content = xs_replace_i(content, "<", "<"); |
| 1137 | content = xs_replace_i(content, ">", ">"); | 1137 | content = xs_replace_i(content, ">", ">"); |
| 1138 | 1138 | ||
| 1139 | /* add the post link */ | ||
| 1140 | xs *l = xs_fmt("<p><a href=\"%s\">%s</a><p>", id, id); | ||
| 1141 | content = xs_str_cat(content, l); | ||
| 1142 | |||
| 1139 | if (strlen(title) > 40) | 1143 | if (strlen(title) > 40) |
| 1140 | title = xs_crop(title, 0, i = 40); | 1144 | title = xs_crop(title, 0, i = 40); |
| 1141 | 1145 | ||