diff options
| author | 2024-11-07 22:01:03 +0100 | |
|---|---|---|
| committer | 2024-11-07 22:01:03 +0100 | |
| commit | b2555fb6b92a984b182d56998608b66f19e9ed91 (patch) | |
| tree | 1cd861d3b766cf2f9124b329f08dda5bae6bbb64 /html.c | |
| parent | Fixed some URLs that should not be proxied. (diff) | |
| parent | Moved make_url() to data.c. (diff) | |
| download | snac2-b2555fb6b92a984b182d56998608b66f19e9ed91.tar.gz snac2-b2555fb6b92a984b182d56998608b66f19e9ed91.tar.xz snac2-b2555fb6b92a984b182d56998608b66f19e9ed91.zip | |
Merge branch 'master' of comam.es:git/snac2
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 16 |
1 files changed, 0 insertions, 16 deletions
| @@ -42,22 +42,6 @@ int login(snac *snac, const xs_dict *headers) | |||
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | xs_str *make_url(const char *href, const char *proxy) | ||
| 46 | /* makes an URL, possibly including proxying */ | ||
| 47 | { | ||
| 48 | xs_str *url = NULL; | ||
| 49 | |||
| 50 | if (proxy && !xs_startswith(href, srv_baseurl)) { | ||
| 51 | xs *p = xs_str_cat(xs_dup(proxy), "/proxy/"); | ||
| 52 | url = xs_replace(href, "https:/" "/", p); | ||
| 53 | } | ||
| 54 | else | ||
| 55 | url = xs_dup(href); | ||
| 56 | |||
| 57 | return url; | ||
| 58 | } | ||
| 59 | |||
| 60 | |||
| 61 | xs_str *replace_shortnames(xs_str *s, const xs_list *tag, int ems, const char *proxy) | 45 | xs_str *replace_shortnames(xs_str *s, const xs_list *tag, int ems, const char *proxy) |
| 62 | /* replaces all the :shortnames: with the emojis in tag */ | 46 | /* replaces all the :shortnames: with the emojis in tag */ |
| 63 | { | 47 | { |