json htmlentities

This commit is contained in:
Pau Capó 2018-05-25 13:28:50 +02:00
parent ef2bf6e3b6
commit e28ab2696e

View file

@ -61,7 +61,7 @@ class AdminerJsonColumn
$name = $field['field'];
?>
<a href="#" id="toggle_json_<?= $name ?>">show as table</a><br>
<pre id="show_json_<?= $name ?>" style="display: none"><?= json_encode($json, JSON_PRETTY_PRINT); ?></pre>
<pre id="show_json_<?= $name ?>" style="display: none"><?= htmlentities(json_encode($json, JSON_PRETTY_PRINT)); ?></pre>
<script <?= nonce() ?>>
document.getElementById('toggle_json_<?= $name ?>').addEventListener('click', function (e) {
e.preventDefault();