# Remove emojis from Open graph meta tags (title and description) but not url!

**URL:** <https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743>\
**Category:** Feature\
**Created:** [21 בפברואר,‏ 2017,‏ 9:04pm UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743 "2017-02-21T21:04:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alonle](https://avatars.discourse-cdn.com/v4/letter/a/f9ae1b/32.png) [@alonle](https://meta.discourse.org/u/alonle)\
**Post date:** [21 בפברואר,‏ 2017,‏ 9:04pm UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743/1 "2017-02-21T21:04:14Z")

</div>

Since the share to Facebook does not show any emojis but only show text like “smile”  
I think we need to remove it and replace it with an empty string

Unfortunately, I’m not a ruby guy, but I think we need to add code in [this file](https://github.com/discourse/discourse/blob/master/app/helpers/application_helper.rb) In function `crawlable_meta_data` and use `opts[property].gsub('/:\S*:/','')`

maybe this can also help to replace the emojis code with Unicode??

> <https://stackoverflow.com/questions/20045268/how-does-facebook-encode-emoji-in-the-json-graph-api>

Remember that we only need to change the title and description, but not the **URL**

Can you please help? 😄

---

<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:** [21 בפברואר,‏ 2017,‏ 11:54pm UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743/2 "2017-02-21T23:54:59Z")

</div>

Sorry, I am not understanding what you wrote here. Can you share screenshots?

---

<div class="post-metadata">

**Author:** ![elijah](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elijah/32/104055_2.png) [@elijah](https://meta.discourse.org/u/elijah)\
**Post date:** [22 בפברואר,‏ 2017,‏ 12:02am UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743/3 "2017-02-22T00:02:51Z")

</div>

He means things like this:

[Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed](http://iframely.com/debug?uri=https%3A%2F%2Fmeta.discourse.org%2Ft%2Fdiscourse-version-1-8%2F49801)

> **Description**

> Focus :﻿white\_check\_mark: Improve usability and design of password reset page. :﻿white\_check\_mark: “Get a room” reminder sent once per topic, to any user who replies to the same user in that topic 3 times in a row. :﻿white\_check\_mark: Much more secure cookie and token rotation scheme and database storage, upgrading to 1.8 is critical for improved db / cookie security :﻿white\_check\_mark: Improve usability and design of invite accept page. “Secure email mode” site setting ensures that no conten…

He doesn’t want :﻿white\_check\_mark:, he wants blank or ✓

---

<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:** [22 בפברואר,‏ 2017,‏ 12:03am UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743/4 "2017-02-22T00:03:34Z")

</div>

Oh right, we should pass that through the reverse Emoji-to-Unicode-Emoji replacer. @neil can you confer with @sam as he wrote a function to do that?

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [22 בפברואר,‏ 2017,‏ 9:45pm UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743/5 "2017-02-22T21:45:35Z")

</div>

Done!

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

---

<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:** [23 בפברואר,‏ 2017,‏ 2:46am UTC](https://meta.discourse.org/t/remove-emojis-from-open-graph-meta-tags-title-and-description-but-not-url/57743/6 "2017-02-23T02:46:49Z")

</div>


