summaryrefslogtreecommitdiff
path: root/internal/processing/account/update.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-08-11 14:40:11 +0200
committerLibravatar GitHub <noreply@github.com>2023-08-11 14:40:11 +0200
commitdc96562b4084e058846aea9102ef0257461717d6 (patch)
treea0b4bdbaa266386c7fdbbc02ca3e62bae559bf17 /internal/processing/account/update.go
parent[feature] Set Content-Security-Policy header (#2095) (diff)
downloadgotosocial-dc96562b4084e058846aea9102ef0257461717d6.tar.xz
[bugfix] Use custom bluemonday policy to disallow inline img tags (#2100)
Diffstat (limited to 'internal/processing/account/update.go')
-rw-r--r--internal/processing/account/update.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go
index f75b3c8d9..ec343f160 100644
--- a/internal/processing/account/update.go
+++ b/internal/processing/account/update.go
@@ -67,7 +67,7 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form
}
// Parse new display name (always from plaintext).
- account.DisplayName = text.SanitizePlaintext(displayName)
+ account.DisplayName = text.SanitizeToPlaintext(displayName)
// If display name has changed, account emojis may have also changed.
emojisChanged = true
@@ -110,8 +110,8 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form
// Sanitize raw field values.
fieldRaw := &gtsmodel.Field{
- Name: text.SanitizePlaintext(name),
- Value: text.SanitizePlaintext(value),
+ Name: text.SanitizeToPlaintext(name),
+ Value: text.SanitizeToPlaintext(value),
}
fieldsRaw = append(fieldsRaw, fieldRaw)
}
@@ -255,7 +255,7 @@ func (p *Processor) Update(ctx context.Context, account *gtsmodel.Account, form
if err := validate.CustomCSS(customCSS); err != nil {
return nil, gtserror.NewErrorBadRequest(err, err.Error())
}
- account.CustomCSS = text.SanitizePlaintext(customCSS)
+ account.CustomCSS = text.SanitizeToPlaintext(customCSS)
}
if form.EnableRSS != nil {