Opened 6 weeks ago
Last modified 6 weeks ago
#62948 new defect (bug)
Posts tagged with complex Emoji can't be found
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7.2 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
If a post is tagged with 🏳️⚧️
- it cannot be found at tag/%F0%9F%8F%B3%EF%B8%8F%E2%80%8D%E2%9A%A7%EF%B8%8F
- I have several blog posts which have a tag of "🏳️⚧️"
- The tag shows on the posts - for example https://shkspr.mobi/blog/2023/04/some-thoughts-on-hacking-the-cis-tem/
- If I visit the tag page, I'm told that no posts exist with that tag - for example https://shkspr.mobi/blog/tag/🏳️⚧️/
Some simpler emoji *do* work as tags. For example https://shkspr.mobi/blog/tag/😊/
Moderately complex flag emoji also work. For example https://shkspr.mobi/blog/tag/🏴☠️/ and https://shkspr.mobi/blog/tag/%f0%9f%8f%b3%ef%b8%8f%f0%9f%8c%88/
My backend database has an encoding of utf8mb4_unicode_520_ci (10.6.20-MariaDB).
Change History (4)
#2
@
6 weeks ago
I think I see the problem. My slug was originally stored as
%f0%9f%8f%b3%ef%b8%8f%e2%80%8d%e2%9a%a7%ef%b8%8f
If I delete the slug and recreate it, I get
%f0%9f%8f%b3%ef%b8%8f%e2%9a%a7%ef%b8%8f
The original is:
- WAVING WHITE FLAG
- VARIATION SELECTOR-16
- ZERO WIDTH JOINER
- MALE WITH STROKE AND MALE AND FEMALE SIGN
- VARIATION SELECTOR-16
The newly recreated one (which works) *doesn't* have the Zero Width Joiner.
If you look at the raw SQL table on your test instance, what's the slug's percent-encoded representation?
Thanks
#3
@
6 weeks ago
Hi @edent,
I checked the raw data in my test instance’s wp_terms table, and here’s what I found:
- The stored slug for 🏳️⚧️ in my database is:
%f0%9f%8f%b3%ef%b8%8f%e2%9a%a7%ef%b8%8f
- This matches the “working” version you mentioned, without the Zero Width Joiner (%e2%80%8d).
Thanks for bringing this up!
#4
@
6 weeks ago
That's why I think this is a bug.
Unicode defines the flag as
1F3F3 FE0F 200D 26A7 FE0F ; RGI_Emoji_ZWJ_Sequence ; transgender flag # E13.0 [1] (🏳️⚧️)
Source: https://unicode.org/Public/emoji/13.0/emoji-zwj-sequences.txt
You can see in the emoji test file that not having the ZWJ results in an "unqualified" representation of the emoji.
Hi @edent! Thanks for bringing up the issue. I tried to reproduce the issue with emoji tags but wasn't able to replicate the problem you're experiencing.
I tested the following:
/tag/🏳️⚧️
/tag/😊
/tag/🏴☠️
All URLs worked and showed the tagged posts correctly. Could you share more information like
Additional information would help narrow down what might be different in your setup causing this issue.
Video: https://rioudcpuyg.ufs.sh/f/PL8E4NiPUWyO7432pdv9AWOSNT8iuxYqzcvCVIEKbQmF3njP
Environment