[bugfix] Fix html-escaped characters in content warnings (#426)

* test status create with odd CWs

* use SanitizeCaption for content warning escaping
This commit is contained in:
tobi
2022-03-13 16:37:45 +01:00
committed by GitHub
parent b8879ac68a
commit e306233166
2 changed files with 104 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, appli
Local: true,
AccountID: account.ID,
AccountURI: account.URI,
ContentWarning: text.RemoveHTML(form.SpoilerText),
ContentWarning: text.SanitizeCaption(form.SpoilerText),
ActivityStreamsType: ap.ObjectNote,
Sensitive: form.Sensitive,
Language: form.Language,