Browse Source

user: remove sanitizer for FullName (#1937)

pull/4343/head
Unknwon 8 years ago
parent
commit
bd1e757350
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 4
      models/user.go
  2. 3
      public/css/gogs.css
  3. 3
      public/less/_user.less

4
models/user.go

@ -32,7 +32,6 @@ import (
"github.com/gogits/gogs/models/errors"
"github.com/gogits/gogs/modules/avatar"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/setting"
)
@ -114,8 +113,6 @@ func (u *User) BeforeUpdate() {
func (u *User) AfterSet(colName string, _ xorm.Cell) {
switch colName {
case "full_name":
u.FullName = markdown.Sanitizer.Sanitize(u.FullName)
case "created_unix":
u.Created = time.Unix(u.CreatedUnix, 0).Local()
case "updated_unix":
@ -707,7 +704,6 @@ func updateUser(e Engine, u *User) error {
u.Website = base.TruncateString(u.Website, 255)
u.Description = base.TruncateString(u.Description, 255)
u.FullName = markdown.Sanitizer.Sanitize(u.FullName)
_, err := e.Id(u.ID).AllCols().Update(u)
return err
}

3
public/css/gogs.css

@ -2861,6 +2861,9 @@ footer .ui.language .menu {
.user.settings.repositories .repos .item .button {
margin-top: -5px;
}
.user.profile .ui.card .header {
word-break: break-all;
}
.user.profile .ui.card .username {
display: block;
}

3
public/less/_user.less

@ -45,6 +45,9 @@
&.profile {
.ui.card {
.header {
word-break: break-all;
}
.username {
display: block;
}

Loading…
Cancel
Save