summaryrefslogtreecommitdiff
path: root/internal/processing/media/create.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-13 16:03:51 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-13 16:03:51 +0200
commitbdba3ff9a9f98c1605c01c0e84f6bd6ed5c3efae (patch)
treefaf0be2250d23aec1af6a6d2bcf321d1d8826ba9 /internal/processing/media/create.go
parentBlock/unblock (#96) (diff)
downloadgotosocial-bdba3ff9a9f98c1605c01c0e84f6bd6ed5c3efae.tar.xz
sanitize html for statuses + instance (#97)
* sanitize html for statuses + instance * sanitization
Diffstat (limited to 'internal/processing/media/create.go')
-rw-r--r--internal/processing/media/create.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/processing/media/create.go b/internal/processing/media/create.go
index f9e383504..baf9f2918 100644
--- a/internal/processing/media/create.go
+++ b/internal/processing/media/create.go
@@ -26,6 +26,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/internal/util"
)
func (p *processor) Create(account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, error) {
@@ -53,7 +54,7 @@ func (p *processor) Create(account *gtsmodel.Account, form *apimodel.AttachmentR
// TODO: handle this inside mediaHandler.ProcessAttachment (just pass more params to it)
// first description
- attachment.Description = form.Description
+ attachment.Description = util.RemoveHTML(form.Description) // remove any HTML from the image description
// now parse the focus parameter
focusx, focusy, err := parseFocus(form.Focus)