diff options
Diffstat (limited to 'internal/typeutils/util.go')
| -rw-r--r-- | internal/typeutils/util.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/internal/typeutils/util.go b/internal/typeutils/util.go index b4f2e41aa..17394fe49 100644 --- a/internal/typeutils/util.go +++ b/internal/typeutils/util.go @@ -28,7 +28,6 @@ import ( "strconv" "strings" - "github.com/k3a/html2text" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" "github.com/superseriousbusiness/gotosocial/internal/config" "github.com/superseriousbusiness/gotosocial/internal/db" @@ -247,7 +246,7 @@ func systemMessage( wrappedNote.WriteString(`<div class="gts-system-message `) wrappedNote.WriteString(messageClass) wrappedNote.WriteString(`">`) - wrappedNote.WriteString(text.SanitizeToHTML(unsanitizedNoteHTML)) + wrappedNote.WriteString(text.SanitizeHTML(unsanitizedNoteHTML)) wrappedNote.WriteString(`</div>`) return wrappedNote.String() @@ -380,15 +379,11 @@ func filterableFields(s *gtsmodel.Status) []string { // Status content. Though we have raw text // available for statuses created on our - // instance, use the html2text version to + // instance, use the plaintext version to // remove markdown-formatting characters // and ensure more consistent filtering. if s.Content != "" { - text := html2text.HTML2TextWithOptions( - s.Content, - html2text.WithLinksInnerText(), - html2text.WithUnixLineBreaks(), - ) + text := text.ParseHTMLToPlain(s.Content) if text != "" { fields = append(fields, text) } |
