FIX: Show emoji in inline oneboxes

This commit is contained in:
Robin Ward
2017-07-21 14:24:28 -04:00
parent c2db2c5c78
commit 574681dc47
7 changed files with 25 additions and 9 deletions

View File

@@ -26,7 +26,10 @@ class InlineOneboxer
# Only public topics
if Guardian.new.can_see?(topic)
onebox = { url: url, title: topic.title }
onebox = {
url: url,
title: Emoji.gsub_emoji_to_unicode(topic.title)
}
Rails.cache.write(cache_key(url), onebox, expires_in: 1.day)
return onebox
end