summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-07-30 09:39:28 +0000
committerDouwe Maan <douwe@gitlab.com>2015-07-30 09:39:28 +0000
commit1e4b3264637a5b66a9bfb04fe9444bcf1f7e18ed (patch)
treeb0041914dbabbf56d9487b7faa113b7d032f7179 /app/views
parentae36842d456f2bd028c8848f2e009141516087ee (diff)
parent369275d63074e5d526c0d1cf404b4a3742bb1e6a (diff)
downloadgitlab-ce-1e4b3264637a5b66a9bfb04fe9444bcf1f7e18ed.tar.gz
Merge branch 'fix-single-quote-in-network-graph' into 'master'
Fix network graph when branch name has single quotes ## Steps to reproduce 1. Create a branch with a single quote in the branch name: "`test`" 2. Look at Project's Network view Closes https://github.com/gitlabhq/gitlabhq/issues/9500 See merge request !1063
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/network/show.html.haml6
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)