summaryrefslogtreecommitdiff
path: root/internal/processing/media
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/media')
-rw-r--r--internal/processing/media/create.go4
-rw-r--r--internal/processing/media/update.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/processing/media/create.go b/internal/processing/media/create.go
index baf9f2918..5b8cdf604 100644
--- a/internal/processing/media/create.go
+++ b/internal/processing/media/create.go
@@ -26,7 +26,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/util"
+ "github.com/superseriousbusiness/gotosocial/internal/text"
)
func (p *processor) Create(account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, error) {
@@ -54,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 = util.RemoveHTML(form.Description) // remove any HTML from the image description
+ attachment.Description = text.RemoveHTML(form.Description) // remove any HTML from the image description
// now parse the focus parameter
focusx, focusy, err := parseFocus(form.Focus)
diff --git a/internal/processing/media/update.go b/internal/processing/media/update.go
index b5ffc77d8..28f3a26f6 100644
--- a/internal/processing/media/update.go
+++ b/internal/processing/media/update.go
@@ -26,7 +26,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
- "github.com/superseriousbusiness/gotosocial/internal/util"
+ "github.com/superseriousbusiness/gotosocial/internal/text"
)
func (p *processor) Update(account *gtsmodel.Account, mediaAttachmentID string, form *apimodel.AttachmentUpdateRequest) (*apimodel.Attachment, gtserror.WithCode) {
@@ -44,7 +44,7 @@ func (p *processor) Update(account *gtsmodel.Account, mediaAttachmentID string,
}
if form.Description != nil {
- attachment.Description = util.RemoveHTML(*form.Description)
+ attachment.Description = text.RemoveHTML(*form.Description)
if err := p.db.UpdateByID(mediaAttachmentID, attachment); err != nil {
return nil, gtserror.NewErrorInternalError(fmt.Errorf("database error updating description: %s", err))
}