mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
FIX: Support HTML entities in topic titles
This commit is contained in:
parent
84d4ebd910
commit
87efa0eddd
1 changed files with 4 additions and 1 deletions
|
@ -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)];
|
||||
|
|
Loading…
Reference in a new issue