diff options
author | Unknwon <u@gogs.io> | 2015-08-20 15:57:51 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-20 15:57:51 +0800 |
commit | ac616c07de95b8e91ec2a3ac321d1802856f55c6 (patch) | |
tree | 66b727b15d8b044924989d6b15631c1b29f7a244 | |
parent | 78b717f202dd989f3871fccd0bc8935fe709fac1 (diff) | |
download | gitea-ac616c07de95b8e91ec2a3ac321d1802856f55c6.tar.gz gitea-ac616c07de95b8e91ec2a3ac321d1802856f55c6.zip |
fix #966
-rw-r--r-- | modules/git/tree.go | 7 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/modules/git/tree.go b/modules/git/tree.go index be77bfce02..27539f06b2 100644 --- a/modules/git/tree.go +++ b/modules/git/tree.go @@ -71,6 +71,13 @@ func parseTreeData(tree *Tree, data []byte) ([]*TreeEntry, error) { step = bytes.IndexByte(data[pos:], '\n') entry.name = string(data[pos : pos+step]) + + // In case entry name is surrounded by double quotes(it happens only in git-shell). + if entry.name[0] == '"' { + entry.name = string(data[pos+1 : pos+step-1]) + entry.name = strings.Replace(entry.name, `\"`, `"`, -1) + } + pos += step + 1 entries = append(entries, entry) } diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index ad3c471bbe..a52d4fd63f 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -102,7 +102,7 @@ </div> {{end}} {{if or $.IsRepositoryAdmin (eq .Poster.Id $.SignedUserID)}} - <a class="edit-content item" href="#" data-type="comment"><i class="octicon octicon-pencil"></i></a> + <a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a> {{end}} </div> </div> |