diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-09-20 09:06:12 +0300 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-09-20 09:06:12 +0300 |
commit | 6104942438c14ec7bd21c6cd5bd995272b3faff6 (patch) | |
tree | 5a4b19ee49242c2dbce27ea633fa27a13e39e5e3 | |
parent | ae1d9fb46aa2b07ee9836d49862ec4e2c46fbbba (diff) | |
download | gitlab-ce-6104942438c14ec7bd21c6cd5bd995272b3faff6.tar.gz |
Sanitize for network graph
-rw-r--r-- | lib/gitlab/graph_commit.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/graph_commit.rb b/lib/gitlab/graph_commit.rb index b9859d79274..e14d670e5c7 100644 --- 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 |