From f4ee85cac937ab6d39f7d069889dad8efcbb97d4 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Mon, 19 Aug 2013 18:31:13 +0200 Subject: [PATCH] SONAR-4580 If project name contains a quote, it will not be added in the recent projects list --- .../webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb index 3a487910501..3db19d7fd4b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb @@ -34,8 +34,8 @@ if @resource && Project.root_qualifiers.include?(@resource.qualifier) %> else { - sonarRecentHistory.add('<%= h @resource.key -%>', - '<%= h @resource.name -%>', + sonarRecentHistory.add('<%= escape_javascript(h(@resource.key)) -%>', + '<%= escape_javascript(h(@resource.name)) -%>', '<%= Api::Utils.java_facade.getResourceType(@resource.qualifier).getIconPath() -%>'); } <% end %> -- 2.39.5