summaryrefslogtreecommitdiff
path: root/app/Template/analytic
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-08-14 17:25:25 -0400
committerFrederic Guillot <fred@kanboard.net>2015-08-14 17:25:25 -0400
commit357102dc6e05bba22a65fd690f8611b131bbae8d (patch)
treeb70a88bca438432ed2eff66da9a3c18172e4c33f /app/Template/analytic
parent17a3781bd8c03e6b653104dbcb996a1ff1213959 (diff)
Fix potential issue with json_encode() in templates
Diffstat (limited to 'app/Template/analytic')
-rw-r--r--app/Template/analytic/avg_time_columns.php2
-rw-r--r--app/Template/analytic/burndown.php2
-rw-r--r--app/Template/analytic/cfd.php2
-rw-r--r--app/Template/analytic/lead_cycle_time.php2
-rw-r--r--app/Template/analytic/tasks.php2
-rw-r--r--app/Template/analytic/users.php2
6 files changed, 6 insertions, 6 deletions
diff --git a/app/Template/analytic/avg_time_columns.php b/app/Template/analytic/avg_time_columns.php
index e74e7950..7b9d7cf9 100644
--- a/app/Template/analytic/avg_time_columns.php
+++ b/app/Template/analytic/avg_time_columns.php
@@ -7,7 +7,7 @@
<?php else: ?>
<section id="analytic-avg-time-column">
- <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-label="<?= t('Average time spent') ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>' data-label="<?= t('Average time spent') ?>"></div>
<table class="table-stripped">
<tr>
diff --git a/app/Template/analytic/burndown.php b/app/Template/analytic/burndown.php
index 59f15223..3dfb6ee8 100644
--- a/app/Template/analytic/burndown.php
+++ b/app/Template/analytic/burndown.php
@@ -6,7 +6,7 @@
<p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p>
<?php else: ?>
<section id="analytic-burndown">
- <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>" data-label-total="<?= t('Total for all columns') ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>" data-label-total="<?= t('Total for all columns') ?>"></div>
</section>
<?php endif ?>
diff --git a/app/Template/analytic/cfd.php b/app/Template/analytic/cfd.php
index ab706d56..45f53e0f 100644
--- a/app/Template/analytic/cfd.php
+++ b/app/Template/analytic/cfd.php
@@ -6,7 +6,7 @@
<p class="alert"><?= t('You need at least 2 days of data to show the chart.') ?></p>
<?php else: ?>
<section id="analytic-cfd">
- <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>' data-date-format="<?= e('%%Y-%%m-%%d') ?>"></div>
</section>
<?php endif ?>
diff --git a/app/Template/analytic/lead_cycle_time.php b/app/Template/analytic/lead_cycle_time.php
index d96bdcb8..8e04bd6d 100644
--- a/app/Template/analytic/lead_cycle_time.php
+++ b/app/Template/analytic/lead_cycle_time.php
@@ -14,7 +14,7 @@
<?php else: ?>
<section id="analytic-lead-cycle-time">
- <div id="chart" data-metrics='<?= json_encode($metrics) ?>' data-label-cycle="<?= t('Cycle Time') ?>" data-label-lead="<?= t('Lead Time') ?>"></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>' data-label-cycle="<?= t('Cycle Time') ?>" data-label-lead="<?= t('Lead Time') ?>"></div>
<form method="post" class="form-inline" action="<?= $this->url->href('analytic', 'leadAndCycleTime', array('project_id' => $project['id'])) ?>" autocomplete="off">
diff --git a/app/Template/analytic/tasks.php b/app/Template/analytic/tasks.php
index 36f36a23..7392ee56 100644
--- a/app/Template/analytic/tasks.php
+++ b/app/Template/analytic/tasks.php
@@ -7,7 +7,7 @@
<?php else: ?>
<section id="analytic-task-repartition">
- <div id="chart" data-metrics='<?= json_encode($metrics) ?>'></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>'></div>
<table>
<tr>
diff --git a/app/Template/analytic/users.php b/app/Template/analytic/users.php
index 263ea0ef..514d7133 100644
--- a/app/Template/analytic/users.php
+++ b/app/Template/analytic/users.php
@@ -7,7 +7,7 @@
<?php else: ?>
<section id="analytic-user-repartition">
- <div id="chart" data-metrics='<?= json_encode($metrics) ?>'></div>
+ <div id="chart" data-metrics='<?= json_encode($metrics, JSON_HEX_APOS) ?>'></div>
<table>
<tr>