]> source.dussan.org Git - gitea.git/commitdiff
fix #966
authorUnknwon <u@gogs.io>
Thu, 20 Aug 2015 07:57:51 +0000 (15:57 +0800)
committerUnknwon <u@gogs.io>
Thu, 20 Aug 2015 07:57:51 +0000 (15:57 +0800)
modules/git/tree.go
templates/repo/issue/view_content.tmpl

index be77bfce022ecf950b9da69f8d70aa984d715b9f..27539f06b2a98416aff38e8458902b7eab2e035e 100644 (file)
@@ -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)
        }
index ad3c471bbe27701bd55c0c78712cc3d8cb2b5c86..a52d4fd63f4802663de6fbb4b3cd6cd28acacb2d 100644 (file)
                                                </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>