diff options
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/bubbleChart.html.erb | 18 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/bubbleChart.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/bubbleChart.html.erb index 4f2c1c71d9d..da8bfdf3c24 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/bubbleChart.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/bubbleChart.html.erb @@ -35,26 +35,26 @@ %> { id: <%= row.resource.id -%>, - key: '<%= row.resource.key -%>', - name: '<%= row.resource.name -%>', - longName: '<%= row.resource.long_name -%>', + key: '<%= escape_javascript row.resource.key -%>', + name: '<%= escape_javascript row.resource.name -%>', + longName: '<%= escape_javascript row.resource.long_name -%>', xMetric: <%= x ? x.value : 0 -%>, - xMetricFormatted: '<%= x ? x.formatted_value : "-" -%>', + xMetricFormatted: '<%= escape_javascript x ? x.formatted_value : "-" -%>', yMetric: <%= y ? y.value : 0 -%>, - yMetricFormatted: '<%= y ? y.formatted_value : "-" -%>', + yMetricFormatted: '<%= escape_javascript y ? y.formatted_value : "-" -%>', sizeMetric: <%= size ? size.value : 0 -%>, - sizeMetricFormatted: '<%= size ? size.formatted_value : "-" -%>' + sizeMetricFormatted: '<%= escape_javascript size ? size.formatted_value : "-" -%>' }, <% end %> ]; var bubbleChartMetrics = { - x: '<%= xMetric.short_name -%>', - y: '<%= yMetric.short_name -%>', - size: '<%= sizeMetric.short_name -%>' + x: '<%= escape_javascript xMetric.short_name -%>', + y: '<%= escape_javascript yMetric.short_name -%>', + size: '<%= escape_javascript sizeMetric.short_name -%>' }; diff --git a/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js b/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js index 0ff68443095..1ccb106e7f0 100644 --- a/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js +++ b/sonar-server/src/main/webapp/javascripts/widgets/bubble-chart.js @@ -156,7 +156,7 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets; var metricLines = [ { metric: widget.metrics().x, value: d.xMetricFormatted }, - { metric: widget.metrics().y, value: '100000000' }, + { metric: widget.metrics().y, value: d.yMetricFormatted }, { metric: widget.metrics().size, value: d.sizeMetricFormatted } ]; |