Fix potential issue with json_encode() in templates

This commit is contained in:
Frederic Guillot
2015-08-14 17:25:25 -04:00
parent 17a3781bd8
commit 357102dc6e
9 changed files with 10 additions and 10 deletions

View File

@@ -6,8 +6,8 @@
<div id="budget-chart">
<div id="chart"
data-date-format="<?= e('%%Y-%%m-%%d') ?>"
data-metrics='<?= json_encode($daily_budget) ?>'
data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type'))) ?>'></div>
data-metrics='<?= json_encode($daily_budget, JSON_HEX_APOS) ?>'
data-labels='<?= json_encode(array('in' => t('Budget line'), 'out' => t('Expenses'), 'left' => t('Remaining'), 'value' => t('Amount'), 'date' => t('Date'), 'type' => t('Type')), JSON_HEX_APOS) ?>'></div>
</div>
<hr/>
<table class="table-fixed table-stripped">