Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-26 12:17:34 +0300
committerStan Hu <stanhu@gmail.com>2015-07-26 13:47:01 +0300
commit562242cb9dc11f0a5957a58eb9f91a484a909b40 (patch)
treea2e84f4464044c9c9286253d04783a1684934e53 /app/views/projects/refs
parent4a76cbe21907b92e53b168f3085c19d00be11f0b (diff)
Fix commit data retrieval when branch name has single quotes
Closes #1724
Diffstat (limited to 'app/views/projects/refs')
-rw-r--r--app/views/projects/refs/logs_tree.js.haml8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/projects/refs/logs_tree.js.haml b/app/views/projects/refs/logs_tree.js.haml
index 35c15cf3a9e..db7f244d002 100644
--- a/app/views/projects/refs/logs_tree.js.haml
+++ b/app/views/projects/refs/logs_tree.js.haml
@@ -11,9 +11,11 @@
- if @logs.present?
:plain
var current_url = location.href.replace(/\/?$/, '/');
- var log_url = '#{namespace_project_tree_url(@project.namespace, @project, tree_join(@ref, @path || '/'))}'.replace(/\/?$/, '/');
+ var log_url = "#{escape_javascript(@log_url)}".replace(/\/?$/, '/');
+
if(current_url == log_url) {
- // Load 10 more commit log for each file in tree
+ // Load more commit logs for each file in tree
// if we still on the same page
- ajaxGet('#{logs_file_namespace_project_ref_path(@project.namespace, @project, @ref, @path || '', offset: (@offset + @limit))}');
+ var url = "#{escape_javascript(@more_log_url)}";
+ ajaxGet(url);
}