From: Stas Vilchik Date: Mon, 19 Jan 2015 09:28:03 +0000 (+0100) Subject: fix SONAR-6041 fix escaping, add missed commas X-Git-Tag: latest-silver-master-#65~192 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4301ad5a7086971f104fc07ddfcb0dcc39dafd0e;p=sonarqube.git fix SONAR-6041 fix escaping, add missed commas --- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb index b3c48d945b6..6c196369401 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb @@ -15,7 +15,7 @@ <% ActiveDashboard.user_dashboards(current_user, true).each do |active_dashboard| %> { url: '/dashboard/?did=<%= active_dashboard.dashboard_id -%>', - labelLocalized: '<%= h active_dashboard.dashboard.name(true) -%>', + labelLocalized: '<%= escape_javascript active_dashboard.dashboard.name(true) -%>', active: <%= @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id ? 'true' : 'false' -%> }, <% end %> @@ -66,7 +66,7 @@ %> { url: '<%= page_url -%>', - labelLocalized: '<%= h message(page.getId() + '.page', :default => page.getTitle()) -%>', + labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>', active: <%= selected ? 'true' : 'false' -%> }, <% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb index 5abfc35c7ca..b7a4d7ec13e 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb @@ -21,7 +21,7 @@ <% ActiveDashboard.user_dashboards(current_user, false).each do |active_dashboard| %> { url: '/dashboard/index?id=<%= @project.key -%>&did=<%= active_dashboard.dashboard_id -%><%= "&"+period_param if period_param -%>', - labelLocalized: '<%= h active_dashboard.dashboard.name(true) -%>', + labelLocalized: '<%= escape_javascript active_dashboard.dashboard.name(true) -%>', active: <%= @dashboard && controller.controller_path=='dashboard' && active_dashboard.dashboard_id==@dashboard.id ? "true" : "false" -%> }, <% end %> @@ -120,7 +120,7 @@ %> { url: '<%= page_url -%>', - labelLocalized: '<%= h message(page.getId() + '.page', :default => page.getTitle()) -%>', + labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>', active: false }, <% end @@ -139,7 +139,7 @@ %> { url: '<%= page_url -%>', - labelLocalized: '<%= h message(page.getId() + '.page', :default => page.getTitle()) -%>', + labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) -%>', active: <%= request.request_uri.include?(page_url) ? "true" : "false" -%> }, <% end %> diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb index 084f8159718..910fdfcc639 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb @@ -32,9 +32,9 @@ %> { url: '<%= page_url -%>', - labelLocalized: '<%= h message(page.getId() + '.page', :default => page.getTitle()) %>', + labelLocalized: '<%= escape_javascript message(page.getId() + '.page', :default => page.getTitle()) %>', active: <%= request.request_uri.include?(page_url) ? 'true' : 'false' -%> - } + }, <% end %> ] },