diff options
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -21,7 +21,7 @@ int login(snac *snac, char *headers) | |||
| 21 | 21 | ||
| 22 | if (auth && xs_startswith(auth, "Basic ")) { | 22 | if (auth && xs_startswith(auth, "Basic ")) { |
| 23 | int sz; | 23 | int sz; |
| 24 | xs *s1 = xs_crop(xs_dup(auth), 6, 0); | 24 | xs *s1 = xs_crop_i(xs_dup(auth), 6, 0); |
| 25 | xs *s2 = xs_base64_dec(s1, &sz); | 25 | xs *s2 = xs_base64_dec(s1, &sz); |
| 26 | 26 | ||
| 27 | xs *l1 = xs_split_n(s2, ":", 1); | 27 | xs *l1 = xs_split_n(s2, ":", 1); |
| @@ -108,11 +108,11 @@ d_char *html_actor_icon(snac *snac, d_char *os, char *actor, | |||
| 108 | s = xs_str_cat(s, "<br>\n \n"); | 108 | s = xs_str_cat(s, "<br>\n \n"); |
| 109 | } | 109 | } |
| 110 | else { | 110 | else { |
| 111 | xs *date_label = xs_crop(xs_dup(date), 0, 10); | 111 | xs *date_label = xs_crop_i(xs_dup(date), 0, 10); |
| 112 | xs *date_title = xs_dup(date); | 112 | xs *date_title = xs_dup(date); |
| 113 | 113 | ||
| 114 | if (!xs_is_null(udate)) { | 114 | if (!xs_is_null(udate)) { |
| 115 | xs *sd = xs_crop(xs_dup(udate), 0, 10); | 115 | xs *sd = xs_crop_i(xs_dup(udate), 0, 10); |
| 116 | 116 | ||
| 117 | date_label = xs_str_cat(date_label, " / "); | 117 | date_label = xs_str_cat(date_label, " / "); |
| 118 | date_label = xs_str_cat(date_label, sd); | 118 | date_label = xs_str_cat(date_label, sd); |
| @@ -682,7 +682,7 @@ d_char *html_entry(snac *snac, d_char *os, char *msg, int local, int level, cons | |||
| 682 | c = xs_replace_i(c, "\r", ""); | 682 | c = xs_replace_i(c, "\r", ""); |
| 683 | 683 | ||
| 684 | while (xs_endswith(c, "<br><br>")) | 684 | while (xs_endswith(c, "<br><br>")) |
| 685 | c = xs_crop(c, 0, -4); | 685 | c = xs_crop_i(c, 0, -4); |
| 686 | 686 | ||
| 687 | c = xs_replace_i(c, "<br><br>", "<p>"); | 687 | c = xs_replace_i(c, "<br><br>", "<p>"); |
| 688 | 688 | ||
| @@ -1045,7 +1045,7 @@ int html_get_handler(d_char *req, char *q_path, char **body, int *b_size, char * | |||
| 1045 | 1045 | ||
| 1046 | /* rss extension? */ | 1046 | /* rss extension? */ |
| 1047 | if (xs_endswith(uid, ".rss")) { | 1047 | if (xs_endswith(uid, ".rss")) { |
| 1048 | uid = xs_crop(uid, 0, -4); | 1048 | uid = xs_crop_i(uid, 0, -4); |
| 1049 | p_path = ".rss"; | 1049 | p_path = ".rss"; |
| 1050 | } | 1050 | } |
| 1051 | else | 1051 | else |