From 357d4e3dd3e68210f8dade35946670e1facecb84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 15 Jun 2015 23:44:39 +0200 Subject: [PATCH] FIX: support for more than 1 emojis in the title --- app/assets/javascripts/discourse/models/topic.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6 index 189db8720..60b40fe63 100644 --- a/app/assets/javascripts/discourse/models/topic.js.es6 +++ b/app/assets/javascripts/discourse/models/topic.js.es6 @@ -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 ? "" + emoji + "" : m;