FIX: Emoji in the post gutter weren't being rendered properly
This commit is contained in:
parent
c8f7e4d878
commit
a3dcd06a93
|
@ -1,6 +1,7 @@
|
||||||
import { iconNode } from 'discourse/helpers/fa-icon';
|
import { iconNode } from 'discourse/helpers/fa-icon';
|
||||||
import { createWidget } from 'discourse/widgets/widget';
|
import { createWidget } from 'discourse/widgets/widget';
|
||||||
import { h } from 'virtual-dom';
|
import { h } from 'virtual-dom';
|
||||||
|
import RawHtml from 'discourse/widgets/raw-html';
|
||||||
|
|
||||||
const MAX_GUTTER_LINKS = 5;
|
const MAX_GUTTER_LINKS = 5;
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ export default createWidget('post-gutter', {
|
||||||
let title = l.title;
|
let title = l.title;
|
||||||
if (title && !seenTitles[title]) {
|
if (title && !seenTitles[title]) {
|
||||||
seenTitles[title] = true;
|
seenTitles[title] = true;
|
||||||
const linkBody = [Discourse.Emoji.unescape(title)];
|
const linkBody = [new RawHtml({ html: `<span>${Discourse.Emoji.unescape(title)}</span>` })];
|
||||||
if (l.clicks) {
|
if (l.clicks) {
|
||||||
linkBody.push(h('span.badge.badge-notification.clicks', l.clicks.toString()));
|
linkBody.push(h('span.badge.badge-notification.clicks', l.clicks.toString()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue