user: remove sanitizer for FullName (#1937)

pull/4343/head
Unknwon 2017-03-23 20:24:02 -04:00
parent 3144be5c81
commit bd1e757350
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
3 changed files with 6 additions and 4 deletions

View File

@ -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
}

View File

@ -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;
}

View File

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