Use utility method for escaping text when generating reply fallback

pull/136/head
Tulir Asokan 2023-06-23 12:35:53 +03:00
parent 77f7e00759
commit 1d9b6a42c9
1 changed files with 1 additions and 3 deletions

View File

@ -11,8 +11,6 @@ import (
"regexp"
"strings"
"golang.org/x/net/html"
"maunium.net/go/mautrix/id"
)
@ -59,7 +57,7 @@ func (evt *Event) GenerateReplyFallbackHTML() string {
parsedContent.RemoveReplyFallback()
body := parsedContent.FormattedBody
if len(body) == 0 {
body = strings.ReplaceAll(html.EscapeString(parsedContent.Body), "\n", "<br/>")
body = TextToHTML(parsedContent.Body)
}
senderDisplayName := evt.Sender