mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: support for more than 1 emojis in the title
This commit is contained in:
parent
76a14cd279
commit
357d4e3dd3
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ const Topic = RestModel.extend({
|
|||
let title = this.get("fancy_title");
|
||||
|
||||
if (Discourse.SiteSettings.enable_emoji && title.indexOf(":") >= 0) {
|
||||
title = title.replace(/:\S+:?/, function(m) {
|
||||
title = title.replace(/:\S+:?/g, function(m) {
|
||||
const emoji = Discourse.Emoji.translations[m] ? Discourse.Emoji.translations[m] : m.slice(1, m.length - 1),
|
||||
url = Discourse.Emoji.urlFor(emoji);
|
||||
return url ? "<img src='" + url + "' title='" + emoji + "' alt='" + emoji + "' class='emoji'>" : m;
|
||||
|
|
Loading…
Reference in a new issue