diff options
author | Stan Hu <stanhu@gmail.com> | 2015-07-26 12:17:34 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-07-26 13:47:01 +0300 |
commit | 562242cb9dc11f0a5957a58eb9f91a484a909b40 (patch) | |
tree | a2e84f4464044c9c9286253d04783a1684934e53 /app/views/projects/refs | |
parent | 4a76cbe21907b92e53b168f3085c19d00be11f0b (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.haml | 8 |
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); } |