diff --git a/kirby/config/methods.php b/kirby/config/methods.php index c1b997e..ab63592 100644 --- a/kirby/config/methods.php +++ b/kirby/config/methods.php @@ -350,7 +350,7 @@ return function (App $app) { * @param string $context Location of output (`html`, `attr`, `js`, `css`, `url` or `xml`) */ 'escape' => function (Field $field, string $context = 'html') { - $field->value = Str::esc($field->value, $context); + $field->value = Str::esc($field->value ?? '', $context); return $field; },