mirror of https://github.com/mautrix/go.git
Use utility method for escaping text when generating reply fallback
parent
77f7e00759
commit
1d9b6a42c9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue