mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-08 12:41:10 -06:00
[feature] Parse content warning as HTML, serialize via API to plaintext
This commit is contained in:
parent
69461c461b
commit
22ce924129
47 changed files with 947 additions and 553 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue