summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/user/setting.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go
index 028e75212d..37039041c4 100644
--- a/routers/user/setting.go
+++ b/routers/user/setting.go
@@ -172,7 +172,7 @@ func SettingsSSHKeysPost(ctx *middleware.Context, form auth.AddSSHKeyForm) {
}
// Remove newline characters from form.KeyContent
- cleanContent := strings.Replace(form.Content, "\n", "", -1)
+ cleanContent := string.Replace(form.Content, "\n", "", -1)
if ok, err := models.CheckPublicKeyString(cleanContent); !ok {
ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error()))