[feature] Parse content warning as HTML, serialize via API to plaintext

This commit is contained in:
tobi 2025-03-06 15:36:58 +01:00
commit 22ce924129
47 changed files with 947 additions and 553 deletions

View file

@ -87,7 +87,7 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, media
// processDescription will sanitize and valid description against server configuration.
func processDescription(description string) (string, gtserror.WithCode) {
description = text.SanitizeToPlaintext(description)
description = text.RemoveHTML(description)
chars := len([]rune(description))
if min := config.GetMediaDescriptionMinChars(); chars < min {