OSDN Git Service
(root)
/
wvm
/
gitlab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae1d9fb
)
Sanitize for network graph
author
randx
<dmitriy.zaporozhets@gmail.com>
Thu, 20 Sep 2012 06:06:12 +0000
(09:06 +0300)
committer
randx
<dmitriy.zaporozhets@gmail.com>
Thu, 20 Sep 2012 06:06:12 +0000
(09:06 +0300)
lib/gitlab/graph_commit.rb
patch
|
blob
|
history
diff --git
a/lib/gitlab/graph_commit.rb
b/lib/gitlab/graph_commit.rb
index
b9859d7
..
e14d670
100644
(file)
--- a/
lib/gitlab/graph_commit.rb
+++ b/
lib/gitlab/graph_commit.rb
@@
-5,6
+5,8
@@
module Gitlab
attr_accessor :time, :space
attr_accessor :refs
+ include ActionView::Helpers::SanitizeHelper
+
def self.to_graph(project)
@repo = project.repo
commits = Grit::Commit.find_all(@repo, nil, {max_count: 650})
@@
-164,7
+166,7
@@
module Gitlab
h[:refs] = refs.collect{|r|r.name}.join(" ") unless refs.nil?
h[:id] = sha
h[:date] = date
- h[:message] =
Gitlab::Encode.utf8(message
)
+ h[:message] =
sanitize(Gitlab::Encode.utf8(message)
)
h[:login] = author.email
h
end