FIX: Better emoji escaping for topic title

This commit also puts emojiVersion in its own erb file.
This commit is contained in:
Tim Lange
2019-03-13 11:17:59 +01:00
committed by Joffrey JAFFEUX
parent 135191d1d1
commit 35426b5ad6
15 changed files with 221 additions and 141 deletions

View File

@@ -157,13 +157,7 @@ class Emoji
end
def self.unicode_unescape(string)
string.each_char.map do |c|
if str = unicode_replacements[c]
":#{str}:"
else
c
end
end.join
PrettyText.escape_emoji(string)
end
def self.gsub_emoji_to_unicode(str)