diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2013-10-31 15:55:20 +0100 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2013-10-31 15:55:26 +0100 |
commit | f8b3f731d946a6ae06719cafd5d5ca4f0a471b0c (patch) | |
tree | 5cfda9b45a29a90745a6087b83a27b91b7e05597 /plugins | |
parent | 2d5769160ce5473e2e83abd399b67674177cf7c9 (diff) | |
download | sonarqube-f8b3f731d946a6ae06719cafd5d5ca4f0a471b0c.tar.gz sonarqube-f8b3f731d946a6ae06719cafd5d5ca4f0a471b0c.zip |
SONAR-55 Fix wrong y metric. Escape javascript injections.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/bubbleChart.html.erb | 18 |
1 files changed, 9 insertions, 9 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 -%>' }; |