From: Alex Lewis Date: Tue, 10 Dec 2013 16:40:10 +0000 (+0000) Subject: issue-350: Fixes issue when an apostrophe is present in a User's name X-Git-Tag: v1.4.0~155^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=06fa257080ab8de7986ad5debbf317eddf5608e7;p=gitblit.git issue-350: Fixes issue when an apostrophe is present in a User's name --- diff --git a/src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java b/src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java index ca894777..44da20ab 100644 --- a/src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java +++ b/src/main/java/com/gitblit/wicket/charting/GoogleLineChart.java @@ -41,7 +41,7 @@ public class GoogleLineChart extends GoogleChart { for (int i = 0; i < values.size(); i++) { ChartValue value = values.get(i); - line(sb, MessageFormat.format("{0}.setValue({1,number,0}, 0, ''{2}'');", dName, i, + line(sb, MessageFormat.format("{0}.setValue({1,number,0}, 0, \"{2}\");", dName, i, value.name)); line(sb, MessageFormat.format("{0}.setValue({1,number,0}, 1, {2,number,0.0});", dName, i, value.value)); diff --git a/src/main/java/com/gitblit/wicket/charting/GooglePieChart.java b/src/main/java/com/gitblit/wicket/charting/GooglePieChart.java index 546a2a9b..71191664 100644 --- a/src/main/java/com/gitblit/wicket/charting/GooglePieChart.java +++ b/src/main/java/com/gitblit/wicket/charting/GooglePieChart.java @@ -65,7 +65,7 @@ public class GooglePieChart extends GoogleChart { if (i < values.size() - 1) { colors.append(','); } - line(sb, MessageFormat.format("{0}.setValue({1,number,0}, 0, ''{2}'');", dName, i, + line(sb, MessageFormat.format("{0}.setValue({1,number,0}, 0, \"{2}\");", dName, i, value.name)); line(sb, MessageFormat.format("{0}.setValue({1,number,0}, 1, {2,number,0.0});", dName, i, value.value));