mirror of
https://github.com/hanzoai/forum.git
synced 2026-09-30 21:51:19 +00:00
... wasn't properly escaped so it would should html entities (like `'` instead of the apostrophe `'`). I checked all the other places we show an excerpt and this was the only one that was missing the call to `htmlSafe` -> `replaceEmoji`. Internal ref - t/128877
26 lines
820 B
Plaintext
26 lines
820 B
Plaintext
import Component from "@glimmer/component";
|
|
import { htmlSafe } from "@ember/template";
|
|
import formatDate from "discourse/helpers/format-date";
|
|
import replaceEmoji from "discourse/helpers/replace-emoji";
|
|
|
|
export default class ThreadPreview extends Component {
|
|
get lastReplyDate() {
|
|
return formatDate(this.args.preview.lastReplyCreatedAt, { leaveAgo: true });
|
|
}
|
|
|
|
<template>
|
|
<span class="chat-message-thread-indicator__last-reply-timestamp">
|
|
{{this.lastReplyDate}}
|
|
</span>
|
|
<span class="c-user-thread__excerpt">
|
|
<span class="c-user-thread__excerpt-poster">
|
|
{{@preview.lastReplyUser.username}}
|
|
</span>
|
|
<span>:</span>
|
|
<span class="c-user-thread__excerpt-text">
|
|
{{replaceEmoji (htmlSafe @preview.lastReplyExcerpt)}}
|
|
</span>
|
|
</span>
|
|
</template>
|
|
}
|