DEV: htmlSafe timeline topic title (#19320)

This commit is contained in:
Isaac Janzen 2022-12-05 11:31:57 -06:00 committed by GitHub
parent 7d7551adfc
commit b46a7b51f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,7 @@
{{#if @fullscreen}}
<div class="title">
<h2>
<a class="fancy-title" href {{on "click" @jumpTop}}>{{if @mobileView @model.fancyTitle ""}}</a>
<a class="fancy-title" href {{on "click" @jumpTop}}>{{this.topicTitle}}</a>
</h2>
{{#if (or this.siteSettings.topic_featured_link_enabled this.showTags)}}
<div class="topic-header-extra">

View File

@ -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