|
1 | 1 | /* eslint-disable ember/no-classic-components, ember/require-tagless-components */ |
2 | 2 | import Component from "@ember/component"; |
3 | 3 | import { computed } from "@ember/object"; |
4 | | -import { reads } from "@ember/object/computed"; |
5 | | -import { service } from "@ember/service"; |
6 | | -import { htmlSafe } from "@ember/template"; |
7 | 4 | import { classNames } from "@ember-decorators/component"; |
8 | 5 | import DButton from "discourse/components/d-button"; |
9 | 6 | import PluginOutlet from "discourse/components/plugin-outlet"; |
10 | 7 | import Post from "discourse/components/post"; |
11 | 8 | import icon from "discourse/helpers/d-icon"; |
| 9 | +import trustHTML from "discourse/helpers/trust-html"; |
12 | 10 | import discourseDebounce from "discourse/lib/debounce"; |
13 | 11 | import { bind } from "discourse/lib/decorators"; |
14 | | -import transformPost from "discourse/lib/transform-post"; |
15 | 12 | import { i18n } from "discourse-i18n"; |
16 | 13 |
|
17 | 14 | @classNames("docs-topic") |
18 | 15 | export default class DocsTopic extends Component { |
19 | | - @service currentUser; |
20 | | - @service site; |
21 | | - |
22 | | - @reads("post.cooked") originalPostContent; |
23 | | - |
24 | | - @computed("currentUser", "model") |
25 | | - get post() { |
26 | | - return transformPost(this.currentUser, this.site, this.model); |
27 | | - } |
28 | | - |
29 | 16 | @computed("topic", "topic.post_stream") |
30 | 17 | get model() { |
31 | 18 | const post = this.store.createRecord( |
@@ -72,7 +59,7 @@ export default class DocsTopic extends Component { |
72 | 59 | /> |
73 | 60 |
|
74 | 61 | <div class="topic-content"> |
75 | | - <h1>{{htmlSafe this.topic.fancyTitle}}</h1> |
| 62 | + <h1>{{trustHTML this.topic.fancyTitle}}</h1> |
76 | 63 | <Post @post={{this.model}} /> |
77 | 64 | </div> |
78 | 65 |
|
|
0 commit comments