diff options
| -rw-r--r-- | format.c | 12 | ||||
| -rw-r--r-- | snac.h | 4 |
2 files changed, 8 insertions, 8 deletions
| @@ -38,10 +38,10 @@ struct { | |||
| 38 | }; | 38 | }; |
| 39 | 39 | ||
| 40 | 40 | ||
| 41 | static d_char *format_line(const char *line) | 41 | static xs_str *format_line(const char *line) |
| 42 | /* formats a line */ | 42 | /* formats a line */ |
| 43 | { | 43 | { |
| 44 | d_char *s = xs_str_new(NULL); | 44 | xs_str *s = xs_str_new(NULL); |
| 45 | char *p, *v; | 45 | char *p, *v; |
| 46 | 46 | ||
| 47 | /* split by markup */ | 47 | /* split by markup */ |
| @@ -90,10 +90,10 @@ static d_char *format_line(const char *line) | |||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | d_char *not_really_markdown(const char *content) | 93 | xs_str *not_really_markdown(const char *content) |
| 94 | /* formats a content using some Markdown rules */ | 94 | /* formats a content using some Markdown rules */ |
| 95 | { | 95 | { |
| 96 | d_char *s = xs_str_new(NULL); | 96 | xs_str *s = xs_str_new(NULL); |
| 97 | int in_pre = 0; | 97 | int in_pre = 0; |
| 98 | int in_blq = 0; | 98 | int in_blq = 0; |
| 99 | xs *list; | 99 | xs *list; |
| @@ -172,10 +172,10 @@ const char *valid_tags[] = { | |||
| 172 | "span", "i", "b", "u", "pre", "code", "em", "strong", NULL | 172 | "span", "i", "b", "u", "pre", "code", "em", "strong", NULL |
| 173 | }; | 173 | }; |
| 174 | 174 | ||
| 175 | d_char *sanitize(const char *content) | 175 | xs_str *sanitize(const char *content) |
| 176 | /* cleans dangerous HTML output */ | 176 | /* cleans dangerous HTML output */ |
| 177 | { | 177 | { |
| 178 | d_char *s = xs_str_new(NULL); | 178 | xs_str *s = xs_str_new(NULL); |
| 179 | xs *sl; | 179 | xs *sl; |
| 180 | int n = 0; | 180 | int n = 0; |
| 181 | char *p, *v; | 181 | char *p, *v; |
| @@ -228,8 +228,8 @@ int activitypub_post_handler(const xs_dict *req, const char *q_path, | |||
| 228 | char *payload, int p_size, | 228 | char *payload, int p_size, |
| 229 | char **body, int *b_size, char **ctype); | 229 | char **body, int *b_size, char **ctype); |
| 230 | 230 | ||
| 231 | d_char *not_really_markdown(const char *content); | 231 | xs_str *not_really_markdown(const char *content); |
| 232 | d_char *sanitize(const char *str); | 232 | xs_str *sanitize(const char *content); |
| 233 | 233 | ||
| 234 | int html_get_handler(const xs_dict *req, const char *q_path, | 234 | int html_get_handler(const xs_dict *req, const char *q_path, |
| 235 | char **body, int *b_size, char **ctype); | 235 | char **body, int *b_size, char **ctype); |