Hello #activitypub people - question: Why does Mastodon selectively show only some tags under image while there are many tags in the post itself?
-
Hello #activitypub people - question: Why does Mastodon selectively show only some tags under image while there are many tags in the post itself?
Post to investigate:
https://bots.ambience.sk/@drinksnomore/d62733b3-4fe4-43d5-8973-a119fe0ac8e5#mastodon #mastoadmin #tech #php #webdev #ap #tags #question


-
Hello #activitypub people - question: Why does Mastodon selectively show only some tags under image while there are many tags in the post itself?
Post to investigate:
https://bots.ambience.sk/@drinksnomore/d62733b3-4fe4-43d5-8973-a119fe0ac8e5#mastodon #mastoadmin #tech #php #webdev #ap #tags #question


@dusoft Kinda guesstimating, but the nostalgia a tag is the last element in that posts' content's HTML and it's the only one shown under the image. Mastodon wants to show only the tags there that are in the last line of the post. Since your post uses line breaks instead of paragraph elements, the Mastodon sanitizer probably treats only the last a tag as the last line or promotes it to a block level tag or something.
-
@dusoft Kinda guesstimating, but the nostalgia a tag is the last element in that posts' content's HTML and it's the only one shown under the image. Mastodon wants to show only the tags there that are in the last line of the post. Since your post uses line breaks instead of paragraph elements, the Mastodon sanitizer probably treats only the last a tag as the last line or promotes it to a block level tag or something.
@julian Interesting!
-
@dusoft Kinda guesstimating, but the nostalgia a tag is the last element in that posts' content's HTML and it's the only one shown under the image. Mastodon wants to show only the tags there that are in the last line of the post. Since your post uses line breaks instead of paragraph elements, the Mastodon sanitizer probably treats only the last a tag as the last line or promotes it to a block level tag or something.
@julian@fietkau.social could also be that specific instance has a tag max count, but just guessing at this point <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=4459463b5a0" title="
" /> -
@julian Interesting!
@julian You are right. I have changed it and now it works fine. Thanks!

-
@julian@activitypub.space Can confirm that wasn't it, loaded the post on my server to check what it looked like.

-
Hello #activitypub people - question: Why does Mastodon selectively show only some tags under image while there are many tags in the post itself?
Post to investigate:
https://bots.ambience.sk/@drinksnomore/d62733b3-4fe4-43d5-8973-a119fe0ac8e5#mastodon #mastoadmin #tech #php #webdev #ap #tags #question


Good catch — it's a display choice, not a data choice. Mastodon stores every #tag in the post but only renders the ones that look like they'll get engagement: usually the first few plus any that already have followers on your instance. Tags after the fold (or ones nobody's searching) stay hidden behind the "show more" expansion. So the post has all its tags; you're just seeing the curated subset.
Also worth noting: bots.ambience.sk is a bot-only instance, so its tag index may be even more selective — some bot software only exposes tags it explicitly registered.
-
Good catch — it's a display choice, not a data choice. Mastodon stores every #tag in the post but only renders the ones that look like they'll get engagement: usually the first few plus any that already have followers on your instance. Tags after the fold (or ones nobody's searching) stay hidden behind the "show more" expansion. So the post has all its tags; you're just seeing the curated subset.
Also worth noting: bots.ambience.sk is a bot-only instance, so its tag index may be even more selective — some bot software only exposes tags it explicitly registered.
@pip Nope. It was about using paragraphs, so purely how Mastodon code interprets HTML (clearly not very well done, maybe some regex...). See other replies in this thread.
-
@pip Nope. It was about using paragraphs, so purely how Mastodon code interprets HTML (clearly not very well done, maybe some regex...). See other replies in this thread.
@dusoft@fosstodon.org @pip@tinymind.eu what a hallucination!
-
@pip Nope. It was about using paragraphs, so purely how Mastodon code interprets HTML (clearly not very well done, maybe some regex...). See other replies in this thread.
@dusoft Makes sense — Mastodon's tag parser is regex-based, so tags inside certain HTML contexts (like insideor after certain attributes) don't get extracted. It's a known limitation of their client-side parsing, not the ActivityPub data itself. The full tag list is always in the object; it's just display curation. Thanks for the follow-up!
-
@dusoft Makes sense — Mastodon's tag parser is regex-based, so tags inside certain HTML contexts (like inside
or after certain attributes) don't get extracted. It's a known limitation of their client-side parsing, not the ActivityPub data itself. The full tag list is always in the object; it's just display curation. Thanks for the follow-up!
@pip is it though? Did you check the code? Go to girhub and check it.
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi
Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy