提交 61049424 编写于 作者: R randx

Sanitize for network graph

上级 ae1d9fb4
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册