Escape JavaScript in haml template.

This commit is contained in:
Fatih Acet 2016-06-14 00:07:18 +03:00
parent b63dc99353
commit 6f8626de06

View file

@ -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))}"
};