Unicode emoji modifiers are not being handled in the same way for topic titles and post content. In titles, they are displayed incorrectly.
For example:
Unicode emoji: π¨βπΎ
In post content:
Title: see title of this topic
Unicode emoji modifiers are not being handled in the same way for topic titles and post content. In titles, they are displayed incorrectly.
For example:
Unicode emoji: π¨βπΎ
In post content:
Title: see title of this topic
Is happening somewhere in fancy_title
function in topic.rb
Will investigate further.
Oh I know why
This will be fixed by https://github.com/discourse/discourse/pull/7095
Last year, I pushed last emojis before apple had updated the set, using another set for missing emojis.
Damn⦠And I thought it had something to do with unicode_unescape
in emoji.rb
converting the modifier to its two respective emojis.
<code>π¨‍πΎ</code>
=>
So close and yet so far
The title is a different issue yes. Sorry didnt make it clear I was talking of the post content difference.
Opened a PR
https://github.com/discourse/discourse/pull/7156
With that fix also came an enhancement for the performEmojiUnescape
function to now also support unicode emojis
This was merged, thanks @venarius - the topic titles look good now
On a related note, it seems that some Unicode emojis are not being converted properly in post content. Inserting the βwoman tipping handβ emoji from iOS results in this:
It seems to work correctly, but then inserts an extra ββ for some reason. It works fine in the topic title.
@david I will have a look at the post content Thanks for the info!
Just noticed that it looks correctly in the title because the regex didnβt match on two emojis next to each other, which is why the emojis in the title are currently not escaped and thus the unicode emojis are directly rendered.
Just opened a PR for this.
Regarding this error I was able to notice that in lib/emoji/db.json
there is
{
"code": "1f481",
"name": "tipping_hand_woman"
}
which should be
{
"code": "1f481-200d-2640-fe0f",
"name": "tipping_hand_woman"
}
@joffreyjaffeux is there an update needed for the db.json? If yes, I would love to take care of this
Hi tim,
sorry fixed it directly, itβs honestly not worth PRs and reviews, itβs a matter of copy/pasting few lines and running some rake tasks.
I can however explain you how it happened: previously some emojis were genderless, and then woman/man version were introduced. And if I remember correctly some of the genderless got the woman version and some the man version. Which is exactly what you found out.
If you find another one, here is the process:
And
This topic was automatically closed after 28 hours. New replies are no longer allowed.