summaryrefslogtreecommitdiff
path: root/internal/processing/media/update.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-11-22 11:49:11 +0100
committerLibravatar GitHub <noreply@github.com>2021-11-22 11:49:11 +0100
commit24f9e1122111a73fbd49c46e0f137ddb0f5d45eb (patch)
tree1b0ef83ac79ec13bdb015837f05d1144a293a333 /internal/processing/media/update.go
parentadd bindAddress configuration option (#320) (diff)
downloadgotosocial-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.go2
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))
}