aboutsummaryrefslogtreecommitdiffstats
path: root/models/graph.go
diff options
context:
space:
mode:
authorPhilippe Kueck <philfry@users.noreply.github.com>2017-03-11 05:01:38 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-03-11 12:01:38 +0800
commite2b2fd6e78a3181fa490f299f4c257eb5e0cc35d (patch)
tree5085127b6612da66bae5d0dfbd9f80fb536fd128 /models/graph.go
parentccc15b9e1a3ddaa2fdf82970d574c9f84449aa3d (diff)
downloadgitea-e2b2fd6e78a3181fa490f299f4c257eb5e0cc35d.tar.gz
gitea-e2b2fd6e78a3181fa490f299f4c257eb5e0cc35d.zip
fix #1189, commit messages containing a pipe (#1203)
Diffstat (limited to 'models/graph.go')
-rw-r--r--models/graph.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/graph.go b/models/graph.go
index 7413f409de..cfd583ca8b 100644
--- a/models/graph.go
+++ b/models/graph.go
@@ -78,8 +78,8 @@ func graphItemFromString(s string, r *git.Repository) (GraphItem, error) {
return GraphItem{}, fmt.Errorf("Failed parsing grap line:%s. Expect 1 or two fields", s)
}
- rows := strings.Split(data, "|")
- if len(rows) != 8 {
+ rows := strings.SplitN(data, "|", 8)
+ if len(rows) < 8 {
return GraphItem{}, fmt.Errorf("Failed parsing grap line:%s - Should containt 8 datafields", s)
}