From 87efa0edddf3d38325c0ef696efa0e463bc5907f Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 25 Apr 2016 14:08:31 -0400 Subject: [PATCH] FIX: Support HTML entities in topic titles --- .../javascripts/discourse/widgets/header-topic-info.js.es6 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/widgets/header-topic-info.js.es6 b/app/assets/javascripts/discourse/widgets/header-topic-info.js.es6 index 94cbf746d..1b6b8a269 100644 --- a/app/assets/javascripts/discourse/widgets/header-topic-info.js.es6 +++ b/app/assets/javascripts/discourse/widgets/header-topic-info.js.es6 @@ -2,6 +2,7 @@ import { createWidget } from 'discourse/widgets/widget'; import { h } from 'virtual-dom'; import { iconNode } from 'discourse/helpers/fa-icon'; import DiscourseURL from 'discourse/lib/url'; +import RawHtml from 'discourse/widgets/raw-html'; export default createWidget('header-topic-info', { tagName: 'div.extra-info-wrapper', @@ -23,10 +24,12 @@ export default createWidget('header-topic-info', { if (loaded) { heading.push(this.attach('topic-status', attrs)); + + const titleHTML = new RawHtml({ html: `${topic.get('fancyTitle')}` }); heading.push(this.attach('link', { className: 'topic-link', action: 'jumpToTopPost', href: topic.get('url'), - contents: () => topic.get('fancyTitle') })); + contents: () => titleHTML })); } const title = [h('h1', heading)];