diff options
author | 2021-11-22 11:49:11 +0100 | |
---|---|---|
committer | 2021-11-22 11:49:11 +0100 | |
commit | 24f9e1122111a73fbd49c46e0f137ddb0f5d45eb (patch) | |
tree | 1b0ef83ac79ec13bdb015837f05d1144a293a333 /internal/processing/media/update.go | |
parent | add bindAddress configuration option (#320) (diff) | |
download | gotosocial-24f9e1122111a73fbd49c46e0f137ddb0f5d45eb.tar.xz |
Fix image description unnecessarily html-escaping innocent characters (#321)
* implement SanitizeCaption function
* tidy up text test setup
Diffstat (limited to 'internal/processing/media/update.go')
-rw-r--r-- | internal/processing/media/update.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/processing/media/update.go b/internal/processing/media/update.go index b3455bc91..42e050121 100644 --- a/internal/processing/media/update.go +++ b/internal/processing/media/update.go @@ -45,7 +45,7 @@ func (p *processor) Update(ctx context.Context, account *gtsmodel.Account, media } if form.Description != nil { - attachment.Description = text.RemoveHTML(*form.Description) + attachment.Description = text.SanitizeCaption(*form.Description) if err := p.db.UpdateByPrimaryKey(ctx, attachment); err != nil { return nil, gtserror.NewErrorInternalError(fmt.Errorf("database error updating description: %s", err)) } |