diff options
| author | 2025-01-02 07:11:58 +0100 | |
|---|---|---|
| committer | 2025-01-02 07:11:58 +0100 | |
| commit | 00079323ccad162d55c0b1f7d25eddf3ea4c1e45 (patch) | |
| tree | 0af63edc2ac4780481d0d0246ab6290e9496597f /httpd.c | |
| parent | When search for URLs, rewrite the query string to be the real post id. (diff) | |
| download | penes-snac2-00079323ccad162d55c0b1f7d25eddf3ea4c1e45.tar.gz penes-snac2-00079323ccad162d55c0b1f7d25eddf3ea4c1e45.tar.xz penes-snac2-00079323ccad162d55c0b1f7d25eddf3ea4c1e45.zip | |
Minor tweak to the /share webpoint.
Diffstat (limited to '')
| -rw-r--r-- | httpd.c | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -281,8 +281,12 @@ int server_get_handler(xs_dict *req, const char *q_path, | |||
| 281 | const char *text = xs_dict_get(q_vars, "text"); | 281 | const char *text = xs_dict_get(q_vars, "text"); |
| 282 | xs *s = NULL; | 282 | xs *s = NULL; |
| 283 | 283 | ||
| 284 | if (xs_type(text) == XSTYPE_STRING) | 284 | if (xs_type(text) == XSTYPE_STRING) { |
| 285 | s = xs_fmt("%s:\n\n%s\n", text, url); | 285 | if (xs_type(url) == XSTYPE_STRING) |
| 286 | s = xs_fmt("%s:\n\n%s\n", text, url); | ||
| 287 | else | ||
| 288 | s = xs_fmt("%s\n", text); | ||
| 289 | } | ||
| 286 | else | 290 | else |
| 287 | s = xs_fmt("%s\n", url); | 291 | s = xs_fmt("%s\n", url); |
| 288 | 292 | ||