From 97b5e49d30d8ed8090a6de45be335da9458f5d34 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Tue, 19 Apr 2016 17:54:20 -0300 Subject: [PATCH] Fix javascript errors with invalid json because of commas --- app/views/shared/issuable/_sidebar.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 55d7a38cce2..03a615d191c 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -151,6 +151,6 @@ :javascript new MilestoneSelect('{"namespace":"#{@project.namespace.path}","path":"#{@project.path}"}'); new LabelsSelect(); - new IssuableContext('#{current_user.to_json(only: [:username, :id, :name])}'); + new IssuableContext('#{escape_javascript(current_user.to_json(only: [:username, :id, :name]))}'); new Subscription('.subscription') new Sidebar(); -- GitLab