diff options
| author | 2024-10-27 01:39:48 -0500 | |
|---|---|---|
| committer | 2024-10-27 01:56:20 -0500 | |
| commit | 9ee991c36fea2b0fb427130ef6e3e9ac28d80806 (patch) | |
| tree | 4216868136c0f5417740350568e6898e78b9058f | |
| parent | In notifications, show the emoji of the EmojiReact. (diff) | |
| download | snac2-9ee991c36fea2b0fb427130ef6e3e9ac28d80806.tar.gz snac2-9ee991c36fea2b0fb427130ef6e3e9ac28d80806.tar.xz snac2-9ee991c36fea2b0fb427130ef6e3e9ac28d80806.zip | |
Wrap user mention in post around span to ensure frontends do not display a link preview for it
Some frontends won't recognize a user mention/tag as an actual mention
unless a span with a special class is wrapped around it, so it will
erronously generate a link preview for it if the span is missing:
https://ak.ari.lt/objects/8e18d701-9fdb-4ba8-8652-30dc2fef58ab
| -rw-r--r-- | activitypub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index 6300fc9..5b9e2fe 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -760,7 +760,7 @@ xs_str *process_tags(snac *snac, const char *content, xs_list **tag) | |||
| 760 | 760 | ||
| 761 | tl = xs_list_append(tl, d); | 761 | tl = xs_list_append(tl, d); |
| 762 | 762 | ||
| 763 | link = xs_fmt("<a href=\"%s\" class=\"u-url h-card mention\">%s</a>", actor, n); | 763 | link = xs_fmt("<span class=\"h-card\"><a href=\"%s\" class=\"u-url mention\">%s</a></span>", actor, n); |
| 764 | } | 764 | } |
| 765 | 765 | ||
| 766 | if (!xs_is_null(link)) | 766 | if (!xs_is_null(link)) |