diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-29 04:15:23 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-30 09:29:47 +0300 |
commit | 369275d63074e5d526c0d1cf404b4a3742bb1e6a (patch) | |
tree | b3db5a7cda290c5279f452322dd1b314c2ea893d /app/views/projects/network | |
parent | 82f0d3e655c48fc67adea88af681d0b5d81810de (diff) |
Fix network graph when branch name has single quotes
Closes https://github.com/gitlabhq/gitlabhq/issues/9500
Diffstat (limited to 'app/views/projects/network')
-rw-r--r-- | app/views/projects/network/show.html.haml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/network/show.html.haml b/app/views/projects/network/show.html.haml index a88cf167511..52b5b8b877e 100644 --- a/app/views/projects/network/show.html.haml +++ b/app/views/projects/network/show.html.haml @@ -17,9 +17,9 @@ :javascript network_graph = new Network({ - url: '#{namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))}', - commit_url: '#{namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")}', - ref: '#{@ref}', + url: "#{escape_javascript(@url)}", + commit_url: "#{escape_javascript(@commit_url)}", + ref: "#{escape_javascript(@ref)}", commit_id: '#{@commit.id}' }) new ShortcutsNetwork(network_graph.branch_graph) |