mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: unescape emoji in pretty title
This makes emoji in title consistent, it is later escaped back when needed
This commit is contained in:
@@ -146,6 +146,16 @@ class Emoji
|
||||
@unicode_replacements
|
||||
end
|
||||
|
||||
def self.unicode_unescape(string)
|
||||
string.each_char.map do |c|
|
||||
if str = unicode_replacements[c]
|
||||
":#{str}:"
|
||||
else
|
||||
c
|
||||
end
|
||||
end.join
|
||||
end
|
||||
|
||||
def self.lookup_unicode(name)
|
||||
@reverse_map ||= begin
|
||||
map = {}
|
||||
|
||||
Reference in New Issue
Block a user