From 77547b4944e0e86dfe27cd98e1811e18d770da9c Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Fri, 11 Sep 2015 09:31:59 +0200 Subject: fix SONAR-6815 Impossible to configure dashboard when one of the widgets has double quotes in its description --- .../src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/sonar-web/src') diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb index 3bb4a42d099..249a17f2a08 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/dashboard/configure.html.erb @@ -81,7 +81,7 @@ widget_title = message("widget.#{definition.id}.name", :default => definition.title).downcase widget_description = message("widget.#{definition.id}.description", :default => definition.description).downcase %> - { id:"<%= widget_id -%>", c:"<%= widget_title.gsub(/\r\n?/, " ") -%> <%= widget_description.gsub(/\r\n?/, " ") -%>" } <%= "," unless index==number_of_widgets-1 -%> + { id:"<%= widget_id -%>", c:"<%= escape_javascript widget_title.gsub(/\r\n?/, " ") -%> <%= escape_javascript widget_description.gsub(/\r\n?/, " ") -%>" } <%= "," unless index==number_of_widgets-1 -%> <% end %> ]; -- cgit v1.2.3