summaryrefslogtreecommitdiff
path: root/internal/processing/account/update.go
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-26 20:25:54 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-26 20:25:54 +0200
commitad0e26dc04008feec8de0603c88fbd63f87c18ec (patch)
treefb8402a9d881b6480eba0a2402f05f7b39f7435c /internal/processing/account/update.go
parentadd trusted proxy for parsing client IPs (#115) (diff)
downloadgotosocial-ad0e26dc04008feec8de0603c88fbd63f87c18ec.tar.xz
Markdown Statuses (#116)
* parse markdown statuses if desired * add some preliminary docs for writing posts
Diffstat (limited to 'internal/processing/account/update.go')
-rw-r--r--internal/processing/account/update.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go
index fbe29ac86..df842bacd 100644
--- a/internal/processing/account/update.go
+++ b/internal/processing/account/update.go
@@ -28,6 +28,7 @@ import (
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/media"
+ "github.com/superseriousbusiness/gotosocial/internal/text"
"github.com/superseriousbusiness/gotosocial/internal/util"
)
@@ -50,7 +51,7 @@ func (p *processor) Update(account *gtsmodel.Account, form *apimodel.UpdateCrede
if err := util.ValidateDisplayName(*form.DisplayName); err != nil {
return nil, err
}
- displayName := util.RemoveHTML(*form.DisplayName) // no html allowed in display name
+ displayName := text.RemoveHTML(*form.DisplayName) // no html allowed in display name
if err := p.db.UpdateOneByID(account.ID, "display_name", displayName, &gtsmodel.Account{}); err != nil {
return nil, err
}
@@ -60,7 +61,7 @@ func (p *processor) Update(account *gtsmodel.Account, form *apimodel.UpdateCrede
if err := util.ValidateNote(*form.Note); err != nil {
return nil, err
}
- note := util.SanitizeHTML(*form.Note) // html OK in note but sanitize it
+ note := text.SanitizeHTML(*form.Note) // html OK in note but sanitize it
if err := p.db.UpdateOneByID(account.ID, "note", note, &gtsmodel.Account{}); err != nil {
return nil, err
}