diff --git a/src/Show/Field.php b/src/Show/Field.php index 77c2a3c34..6ff26c6c7 100755 --- a/src/Show/Field.php +++ b/src/Show/Field.php @@ -408,7 +408,13 @@ public function json() return $this->unescape()->as(function ($value) use ($field) { $content = is_string($value) ? json_decode($value, true) : $value; - + if (is_array($content)) { + array_walk($content, function (&$v, $k) { + $v = htmlspecialchars($v); + }); + } else { + $content = htmlspecialchars($content); + } $field->wrap(false); return Dump::make($content);