Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
61049424
Commit
61049424
authored
Sep 20, 2012
by
randx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanitize for network graph
parent
ae1d9fb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lib/gitlab/graph_commit.rb
lib/gitlab/graph_commit.rb
+3
-1
No files found.
lib/gitlab/graph_commit.rb
View file @
61049424
...
@@ -5,6 +5,8 @@ module Gitlab
...
@@ -5,6 +5,8 @@ module Gitlab
attr_accessor
:time
,
:space
attr_accessor
:time
,
:space
attr_accessor
:refs
attr_accessor
:refs
include
ActionView
::
Helpers
::
SanitizeHelper
def
self
.
to_graph
(
project
)
def
self
.
to_graph
(
project
)
@repo
=
project
.
repo
@repo
=
project
.
repo
commits
=
Grit
::
Commit
.
find_all
(
@repo
,
nil
,
{
max_count:
650
})
commits
=
Grit
::
Commit
.
find_all
(
@repo
,
nil
,
{
max_count:
650
})
...
@@ -164,7 +166,7 @@ module Gitlab
...
@@ -164,7 +166,7 @@ module Gitlab
h
[
:refs
]
=
refs
.
collect
{
|
r
|
r
.
name
}.
join
(
" "
)
unless
refs
.
nil?
h
[
:refs
]
=
refs
.
collect
{
|
r
|
r
.
name
}.
join
(
" "
)
unless
refs
.
nil?
h
[
:id
]
=
sha
h
[
:id
]
=
sha
h
[
:date
]
=
date
h
[
:date
]
=
date
h
[
:message
]
=
Gitlab
::
Encode
.
utf8
(
message
)
h
[
:message
]
=
sanitize
(
Gitlab
::
Encode
.
utf8
(
message
)
)
h
[
:login
]
=
author
.
email
h
[
:login
]
=
author
.
email
h
h
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment