Unknwon 9 年之前
父节点
当前提交
ac616c07de
共有 2 个文件被更改,包括 8 次插入1 次删除
  1. 7 0
      modules/git/tree.go
  2. 1 1
      templates/repo/issue/view_content.tmpl

+ 7 - 0
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)
 	}

+ 1 - 1
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>