As I was writing my previous post on how tags with spaces (and dashes and underscores) were federating, I wanted to test this more systematically. So, this is that post. It is merely a test balloon to assess current behavior.
I will be editing this post with the “Results” in the section below. But let me start with the parameters of the Experiment Setup and Hypothesis. Here’s the outline for the rest of the post:
Experiment Setup
Here are all the tags that I am trying…
It will be curious to see in the different ways in which this blows up (or works out) 😁🤣
For what it’s worth, this is how it shows up in my WordPress blog post preview:
At least WordPress does not seem to have an issue in displaying all these tags with the special characters (at least in preview mode). Be interesting to see what happens when I publish; and certainly what happens when this federates. 🤞
Hypothesis
All the special characters will get filtered out when this blog post federates. And the character that shows up after the special character will get capitalized.
So, this is what I would expect:
WordPress tag | Expected Mastodon Tag |
“doubleQuoteTag” | doubleQuoteTag |
‘quoteTag’ | quoteTag |
backslash/tag | backslashTag |
colon:tags | colonTags |
dash-tags | dashTags |
exclaim!tags | exclaimTags |
fullStop.tags | fullStopTags |
n–dashTags | nDashTags |
plus+tag | plusTag |
semicolon;tags | semicolonTags |
slash/tag | slashTag |
space tags | spaceTags |
underscore_tags | underscoreTags |
quote’tags | quoteTags |
doublequote’tags | doublequoteTags |
Results (pending)
First, let me just post the screenshots from both WordPress and Mastodon. Then I will dig into how the results panned out (using my table from the Hypothesis section). Finally, I will callout some conclusions.
Raw Screenshot: WordPress (live, i.e., non-preview)
WordPress stayed true to what it promised in the preview mode (from the screenshot above). It seems to have shown all tags, with the special characters intact. At least, I cannot spot any exceptions.
Raw Screenshots: Mastodon
I grabbed these screenshots soon after this blog post federated over to Mastodon and before I made any edits after-publishing from WordPress.
Here is the full post with the “Read more >” UX. All tags seem to have federated.
Here is another screenshot of the post on Mastodon when I opened to read the full post: all hashtags show up at the bottom of the post (expected behavior at this point for federated WP posts).
Results: Expected vs. Reality
WordPress tag | Expected Mastodon Tag | Actual Mastodon tag | |
“doubleQuoteTag” | doubleQuoteTag | DoubleQuoteTag_ | ❌ |
‘quoteTag’ | quoteTag | QuoteTag_ | ❌ |
backslash/tag | backslashTag | backslashTag | ✅ |
colon:tags | colonTags | colonTags | ✅ |
dash-tags | dashTags | dashTags | ✅ |
exclaim!tags | exclaimTags | exclaimTags | ✅ |
fullStop.tags | fullStopTags | fullStopTags | ✅ |
n–dashTags | nDashTags | nDashTags | ✅ |
plus+tag | plusTag | plusTag | ✅ |
semicolon;tags | semicolonTags | semicolonTags | ✅ |
slash/tag | slashTag | slashTag | ✅ |
space tags | spaceTags | spaceTag | ✅ |
underscore_tags | underscoreTags | underscoreTags | ✅ |
quote’tags | quoteTags | quoteTags | ✅ |
doublequote’tags | doublequoteTags | doublequoteTags | ✅ |
Conclusions
- WordPress did not drop any tag on the WP blogpost.
- No tag was dropped in the federation. All tags show up on Mastodon.
- The translation for all tags match my expectations except for “doubleQuoteTag” and ‘quoteTag’ (I talk about that next…)
“doubleQuoteTag” and ‘quoteTag’
In retrospect, I made a mistake here, but I also did not fully expect what actually showed up.
If my mind was working correctly, I should have expected:
- “doubleQuoteTag” … translates to … DoubleQuoteTag
- “quoteTag” … translates to … QuoteTag
But surprisingly, in addition to that an underscore got added at the end! What I got instead was DoubleQuoteTag_ and QuoteTag_. I think I might have tugged at a fun corner case here.
Overall, I think my hypothesis holds, expect for trailing special characters:
All the special characters will get filtered out when a WP.com blog post federates. And the character that shows up after the special character will get capitalized (at least in English). But if the special character is a trailing character, then it gets replaced by an underscore (_) character.
– vijay, watching Silicon Valley 📺
Leave a comment