diff options
| -rw-r--r-- | activitypub.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 97fdc7b..b878bc5 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -272,7 +272,7 @@ void process_tags(snac *snac, const char *content, d_char **n_content, d_char ** | |||
| 272 | char *p, *v; | 272 | char *p, *v; |
| 273 | int n = 0; | 273 | int n = 0; |
| 274 | 274 | ||
| 275 | split = xs_regex_split(content, "(@[A-Za-z0-9_]+@[A-Za-z0-9\\.-]+|#[^ ,\\.:;<]+)"); | 275 | split = xs_regex_split(content, "(@[A-Za-z0-9_]+@[A-Za-z0-9\\.-]+|&#[0-9]+;|#[^ ,\\.:;<]+)"); |
| 276 | 276 | ||
| 277 | p = split; | 277 | p = split; |
| 278 | while (xs_list_iter(&p, &v)) { | 278 | while (xs_list_iter(&p, &v)) { |
| @@ -321,6 +321,13 @@ void process_tags(snac *snac, const char *content, d_char **n_content, d_char ** | |||
| 321 | /* add the code */ | 321 | /* add the code */ |
| 322 | nc = xs_str_cat(nc, l); | 322 | nc = xs_str_cat(nc, l); |
| 323 | } | 323 | } |
| 324 | else | ||
| 325 | if (*v == '&') { | ||
| 326 | /* HTML Unicode entity, probably part of an emoji */ | ||
| 327 | |||
| 328 | /* write as is */ | ||
| 329 | nc = xs_str_cat(nc, v); | ||
| 330 | } | ||
| 324 | } | 331 | } |
| 325 | else | 332 | else |
| 326 | nc = xs_str_cat(nc, v); | 333 | nc = xs_str_cat(nc, v); |