# Rendering of ® in post results in ®

**URL:** https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705
**Category:** Bug
**Created:** [7 במרץ,‏ 2016,‏ 8:34pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705 "2016-03-07T20:34:19Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [7 במרץ,‏ 2016,‏ 8:34pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/1 "2016-03-07T20:34:19Z")

</div>

Reproduce:

1. Reply to a topic and use ‘®’ in the body of the post.

Expected results:

- The ‘®’ symbol appears in the post where desired.

**Actual results - editor window:**

> ![](https://global.discourse-cdn.com/meta/original/3X/c/c/cc331db2f9489aabbf375624582aad1d487791ba.png)

**Actual results - editor preview:**

> ![](https://global.discourse-cdn.com/meta/original/3X/b/0/b02dcd209ef9028b718d0909e2301f05dd6c6a21.png)

**Actual results - rendered post:**

> ![](https://global.discourse-cdn.com/meta/original/3X/6/a/6af8ad6eab7ad19e69b03a9f414702c1b08d3381.png)

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [7 במרץ,‏ 2016,‏ 8:35pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/2 "2016-03-07T20:35:44Z")

</div>

Seeing the rendering here, suggests that it’s trying to be replaced with an emoji for some reason. (Why?!)

That said, for additional detail, we’re using the **Twitter** emoji set.

---

<div class="post-metadata">

### Author: ![mr8](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mr8](https://meta.discourse.org/u/mr8)
#### Post date: [7 במרץ,‏ 2016,‏ 8:48pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/3 "2016-03-07T20:48:22Z")

</div>

> [@Auto-replace emoji like smiling\_face with Discourse codes](https://meta.discourse.org/t/auto-replace-emoji-like-with-discourse-codes/26155):
>
> Over on TDWTF, I’ve been using a bot to automatically replace Unicode emoji like slight_smile with Discourse emoji codes like smile; it’s useful when posting from mobile. @codinghorror suggests it could be made a Discourse feature; it never occurred to me before, but it does sound like it’d be useful. That way it could also work in PMs, which is something I haven’t got working in my bot yet.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [7 במרץ,‏ 2016,‏ 9:10pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/4 "2016-03-07T21:10:21Z")

</div>

Thanks. That’s informative, but unfortunately doesn’t resolve the problem of not rendering correctly if (apparently) you aren’t using the EmojiOne set.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [7 במרץ,‏ 2016,‏ 9:18pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/5 "2016-03-07T21:18:33Z")

</div>

I believe this was updated with the new emoji updates, as my table of unicode chars → emoji replacements grew. If people don’t like it we could remove it. What does everyone think?

---

<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: [7 במרץ,‏ 2016,‏ 9:23pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/6 "2016-03-07T21:23:14Z")

</div>

@eviltrout I think the bug here is that we are not adding some space around things. So our replacer can leave you with broken markup, maybe add zero width space around emoji subs.

`test:registered: :registered:`

test:registered: ®

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [7 במרץ,‏ 2016,‏ 10:54pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/7 "2016-03-07T22:54:43Z")

</div>

I definitely do not want the HTML entities replaced, e.g.

`&trade;` → ™  
`&copy;` → ©  
`&reg;` → ®

The above should _not_ be using Emoji.. nor should raw unicode, let’s try raw:

`™ © ®` → ™ © ®

Yeah that’s not desired. Replacing infinitely scaleable typographical font vectors with emoji images is Not Cool™

---

<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: [7 במרץ,‏ 2016,‏ 10:56pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/8 "2016-03-07T22:56:12Z")

</div>

The issue though was​😅 common to emojis as well​☺

as well​☺

`as well☺`

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [9 במרץ,‏ 2016,‏ 8:01pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/9 "2016-03-09T20:01:03Z")

</div>

Okay, I’ve fixed both issues. Emoji replacements beside words will now work, and I no longer replace “TM, Copyright or Registered” automatically.

[https://github.com/discourse/discourse/commit/616006a9ce40cbd6361e61db8ed5246863e65fba](https://github.com/discourse/discourse/commit/616006a9ce40cbd6361e61db8ed5246863e65fba)

---

<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: [9 במרץ,‏ 2016,‏ 8:19pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/10 "2016-03-09T20:19:10Z")

</div>

Can you get away with a zero width space ?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [9 במרץ,‏ 2016,‏ 8:31pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/11 "2016-03-09T20:31:25Z")

</div>

I’m not sure if our emoji code supports that but this approach seems to work well enough.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [9 במרץ,‏ 2016,‏ 9:42pm UTC](https://meta.discourse.org/t/rendering-of-in-post-results-in-registered/40705/12 "2016-03-09T21:42:24Z")

</div>


