diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-06-14 00:07:18 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-06-14 00:07:18 +0300 |
commit | 6f8626de0609da6c789457153b2b19dc79db2c95 (patch) | |
tree | 1c1b351bfc3871a8f60b000cbc23fda85a1f5176 | |
parent | b63dc993534a567b7aba737db1565e3b56033ba2 (diff) | |
download | gitlab-ce-category-search-dropdown.tar.gz |
Escape JavaScript in haml template.category-search-dropdown
-rw-r--r-- | app/views/layouts/_search.html.haml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index 4587cf50653..245b9c3b4d4 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -38,19 +38,19 @@ :javascript gl.projectOptions = gl.projectOptions || {}; - gl.projectOptions["#{@project.path}"] = { + gl.projectOptions["#{j(@project.path)}"] = { issuesPath: "#{namespace_project_issues_path(@project.namespace, @project)}", mrPath: "#{namespace_project_merge_requests_path(@project.namespace, @project)}", - name: "#{@project.name}" + name: "#{j(@project.name)}" }; - if @group and @group.path :javascript gl.groupOptions = gl.groupOptions || {}; - gl.groupOptions["#{@group.path}"] = { - name: "#{@group.name}", - issuesPath: "#{issues_group_path(@group.path)}", - mrPath: "#{merge_requests_group_path(@group.path)}" + gl.groupOptions["#{j(@group.path)}"] = { + name: "#{j(@group.name)}", + issuesPath: "#{issues_group_path(j(@group.path))}", + mrPath: "#{merge_requests_group_path(j(@group.path))}" }; |