From b46a7b51f7bd256611f529447815dfb790ada4ca Mon Sep 17 00:00:00 2001 From: Isaac Janzen <50783505+janzenisaac@users.noreply.github.com> Date: Mon, 5 Dec 2022 11:31:57 -0600 Subject: [PATCH] DEV: htmlSafe timeline topic title (#19320) --- .../discourse/app/components/topic-timeline/container.hbs | 2 +- .../discourse/app/components/topic-timeline/container.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-timeline/container.hbs b/app/assets/javascripts/discourse/app/components/topic-timeline/container.hbs index 93fce8a0916..b07c1d4807b 100644 --- a/app/assets/javascripts/discourse/app/components/topic-timeline/container.hbs +++ b/app/assets/javascripts/discourse/app/components/topic-timeline/container.hbs @@ -1,7 +1,7 @@ {{#if @fullscreen}}

- {{if @mobileView @model.fancyTitle ""}} + {{this.topicTitle}}

{{#if (or this.siteSettings.topic_featured_link_enabled this.showTags)}}
diff --git a/app/assets/javascripts/discourse/app/components/topic-timeline/container.js b/app/assets/javascripts/discourse/app/components/topic-timeline/container.js index 9442219d485..bb522a65061 100644 --- a/app/assets/javascripts/discourse/app/components/topic-timeline/container.js +++ b/app/assets/javascripts/discourse/app/components/topic-timeline/container.js @@ -58,6 +58,10 @@ export default class TopicTimelineScrollArea extends Component { this.calculatePosition(); } + get topicTitle() { + return htmlSafe(this.args.mobileView ? this.args.model.fancyTitle : ""); + } + get showTags() { return ( this.siteSettings.tagging_enabled && this.args.model.tags?.length > 0