fix: [JSON fields] fixed escaping issues
parent
ff77af0a8e
commit
92ddd04ba0
|
@ -1,9 +1,12 @@
|
|||
<?php
|
||||
$data = h($this->Hash->extract($row, $field['data_path']));
|
||||
$data = $this->Hash->extract($row, $field['data_path']);
|
||||
// I feed dirty for this...
|
||||
if (is_array($data) && count($data) === 1 && isset($data[0])) {
|
||||
$data = $data[0];
|
||||
}
|
||||
if (!is_array($data)) {
|
||||
$data = json_decode($data, true);
|
||||
}
|
||||
echo sprintf(
|
||||
'<div class="json_container_%s"></div>',
|
||||
h($k)
|
||||
|
|
Loading…
Reference in New Issue