Преглед на файлове

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
Kirby преди 1 година
родител
ревизия
9ee991c36f
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      activitypub.c

+ 1 - 1
activitypub.c

@@ -760,7 +760,7 @@ xs_str *process_tags(snac *snac, const char *content, xs_list **tag)
 
 
                     tl = xs_list_append(tl, d);
                     tl = xs_list_append(tl, d);
 
 
-                    link = xs_fmt("<a href=\"%s\" class=\"u-url h-card mention\">%s</a>", actor, n);
+                    link = xs_fmt("<span class=\"h-card\"><a href=\"%s\" class=\"u-url mention\">%s</a></span>", actor, n);
                 }
                 }
 
 
                 if (!xs_is_null(link))
                 if (!xs_is_null(link))