# Emojis selected on iOS displaying additional rectangles

**URL:** https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132
**Category:** Support
**Created:** [April 25, 2018, 9:26am UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132 "2018-04-25T09:26:40Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![nibl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nibl/32/119684_2.png) [@nibl](https://meta.discourse.org/u/nibl)
#### Post date: [April 25, 2018, 9:26am UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/1 "2018-04-25T09:26:40Z")

</div>

Certain emojis display a rectangle after the image. Does anyone know the cause for this?

I’ve attached two screenshots below. One shows the emojis when writing a new post, the second what happens after posting.

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/d/bda3512060c8d8534c3aacda11cb5fc3e9dd54c3.jpeg)

I’m running version 2.0.0 beta 6 of Discourse. The emoji set is Apple/International.

Test: happy little ⛅ ☁ and happy little 🌲 🌳.

Hmm, it’s happening on here too. At least for me viewing on an iOS device.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [April 25, 2018, 10:04am UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/2 "2018-04-25T10:04:07Z")

</div>

AFAIK it is a difference with the iOS emoji. I have noticed the same “squares” effect with other applications as well.

For example, these are from the Discourse emoji picker:  
🦉 🍵 🏨 🇬🇫

While these are from the iPad keyboard selector:

🎛 🎎 🖇 ⚛ ⚜

Easy solution, use the Discourse emojis.

---

<div class="post-metadata">

### Author: ![nibl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nibl/32/119684_2.png) [@nibl](https://meta.discourse.org/u/nibl)
#### Post date: [April 25, 2018, 10:58am UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/3 "2018-04-25T10:58:02Z")

</div>

Thanks, just tested. Indeed, the Discourse emoji work as expected, without any additional rectangles.

Out of curiosity, is this some kind of Unicode issue where the two systems don’t know how to interpret the codes?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [April 25, 2018, 7:15pm UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/4 "2018-04-25T19:15:45Z")

</div>

> [@nibl](#):
>
> is this some kind of Unicode issue

I’m fairly certain it is, yes. And I’m thinking that Discourse vs. iOS emojis was a missing bit of information in this earlier topic

> [@What is the problem with PrettyText.markdown call?](https://meta.discourse.org/t/what-is-the-problem-with-prettytext-markdown-call/84674):
>
> PrettyText.markdown("heartheartheart", {}) Will not generate the same code as: PrettyText.markdown("heart:heart::heart:", {}) It generates: =\> "\<p\>\<img src=\"/images/emoji/apple/heart.png?v=5\" title=\"heart\" class=\"emoji\" alt=\"heart\"\>️heart️heart️\</p\>" ( there are ':️' & ':', copy paste to https://www.soscisurvey.de/tools/view-chars.php to see it) I think it has something to do with replacement = "\u200b" + replacement; In lib/pretty\_text/shims.js ( on 1.9.4 )

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [October 4, 2018, 11:34pm UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/6 "2018-10-04T23:34:59Z")

</div>

I just came across this today when posting ❤ 🧡 💛 (this is actually from a Mac now, this is not iOS specific, it is Emoji code → Emoji conversion)

@pmusaraj can you have a look at this?

Also see: [What is the problem with PrettyText.markdown call?](https://meta.discourse.org/t/what-is-the-problem-with-prettytext-markdown-call/84674)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [October 5, 2018, 2:23pm UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/7 "2018-10-05T14:23:25Z")

</div>

I think there are two separate issues here.

The first one is that sometimes when using multiple emojis without spaces, some of them won’t convert correctly. Could this be due to:

> [@What is the problem with PrettyText.markdown call?](https://meta.discourse.org/t/what-is-the-problem-with-prettytext-markdown-call/84674/23):
>
> We only allow emoji expansion after a punctuation or space.

🧡💚💛💙💜❤❤❤ (no spaces between)  
🧡 💚 💛 💙 💜 ❤ ❤ ❤ (spaces between)

The second issue is that extra square after some emojis. Not sure yet what this might be.

Update: those extra squares only show on Safari, screenshot below has the same post in Safari, Chrome, Firefox (left to right):

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/b/db595382b11a919edcee50b3a0dacbd3aef2e561.jpeg)

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [October 5, 2018, 5:00pm UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/8 "2018-10-05T17:00:40Z")

</div>

It turns out the two issues are related. Some emojis include the Unicode `U+FE0F` character, which is the [VARIATION SELECTOR-16 selector](https://emojipedia.org/variation-selector-16/), an “invisible codepoint which specifies that the preceding character should be displayed with emoji presentation”. Since the preceding code point is turned into an image, Safari gets confused, and it displays this rectangle instead.

[https://github.com/discourse/discourse/pull/6456](https://github.com/discourse/discourse/pull/6456)

Note that the PR trims `U+FE0F` when replacing unicode emojis but I wonder whether it breaks emojis when they get converted back to Unicode in push notifications and the like.

---

<div class="post-metadata">

### Author: ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)
#### Post date: [December 20, 2018, 2:22pm UTC](https://meta.discourse.org/t/emojis-selected-on-ios-displaying-additional-rectangles/86132/9 "2018-12-20T14:22:23Z")

</div>


