diff options
| author | grunfink <grunfink@comam.es> | 2026-03-04 16:00:47 +0100 |
|---|---|---|
| committer | grunfink <grunfink@comam.es> | 2026-03-04 16:00:47 +0100 |
| commit | 4e7bc6c0d80d5c41fff8231a898461abdd6df7b0 (patch) | |
| tree | 500fe1b2be89c9b818a4aa5c88e1e4d55ffd606a | |
| parent | d91c99ab7e9e2ffafaa1df4c89389434d0d03e56 (diff) | |
Fixed bug in Mastodon-style share button.
| -rw-r--r-- | html.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4542,7 +4542,6 @@ int html_get_handler(const xs_dict *req, const char *q_path, if (xs_type(login) == XSTYPE_STRING && xs_type(content) == XSTYPE_STRING) { xs *b64 = xs_base64_enc(content, strlen(content)); - srv_log(xs_fmt("share-bridge for user '%s'", login)); *body = xs_fmt("%s/%s/share?content=%s", srv_baseurl, login, b64); @@ -5191,8 +5190,9 @@ int html_get_handler(const xs_dict *req, const char *q_path, } else { const char *b64 = xs_dict_get(q_vars, "content"); + xs *b64_2 = xs_replace(b64, " ", "+"); int sz; - xs *content = xs_base64_dec(b64, &sz); + xs *content = xs_base64_dec(b64_2, &sz); xs *msg = msg_note(&snac, content, NULL, NULL, NULL, 0, NULL, NULL); xs *c_msg = msg_create(&snac, msg); |