]> source.dussan.org Git - sonarqube.git/commitdiff
fix SONAR-6041 fix escaping, add missed commas
authorStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 09:28:03 +0000 (10:28 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 19 Jan 2015 09:28:03 +0000 (10:28 +0100)
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_global.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_project.html.erb
server/sonar-web/src/main/webapp/WEB-INF/app/views/layouts/_navbar_conf_settings.html.erb

index b3c48d945b68fd5831ca3b8ddd380dc4930eb3fc..6c19636940197231ed0ed44c810b41e169cd0e36 100644 (file)
@@ -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 %>
index 5abfc35c7cafdd8ffb2e7fef03e5e26a3df48464..b7a4d7ec13ea272ca978484bc7716d253dae5257 100644 (file)
@@ -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 %>
             %>
             {
               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
             %>
             {
               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 %>
index 084f8159718de98b8668ee31a8452f496239d7a2..910fdfcc63965f1255179ec25a9202582cba0cb8 100644 (file)
@@ -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 %>
           ]
         },