FIX: Support HTML entities in topic titles

This commit is contained in:
Robin Ward 2016-04-25 14:08:31 -04:00
parent 84d4ebd910
commit 87efa0eddd
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
1 changed files with 4 additions and 1 deletions

View File

@ -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: `<span>${topic.get('fancyTitle')}</span>` });
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)];