From 24f9e1122111a73fbd49c46e0f137ddb0f5d45eb Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 22 Nov 2021 11:49:11 +0100 Subject: Fix image description unnecessarily html-escaping innocent characters (#321) * implement SanitizeCaption function * tidy up text test setup --- internal/processing/media/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/processing/media/update.go') 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)) } -- cgit v1.2.3